SAP UI5 Negative cache的工作原理
I am testing my Fiori extension project created based on SAP standard Fiori application “My Opportunity” and I meet with error message “Error: found in negative cache: ‘cus/crm/opportunityExt/Component.js’ from /sap/bc/ui5_ui5/sap/extcrm_opp/Component.js: Error: found in negative cache: ‘cus/crm/opportunity/Component.js’ from /sap/bc/ui5_ui5/ui2/ushell/resources/cus/crm/opportunity/Component.js: 404 – NOT FOUND” when I click tile of my Extension project in Fiori launchpad:
Issue analysis
put mouse onto the hyperlink part of the topmost callstack, “at a1…”, the mouse becomes a hand shape:
click it, and Chrome will bring us to the exact code where this error occurs. Click the bracket icon to format the code:
Now the reason of this “negative cache” is clear: there is a global array M which stores all currently loaded modules with their url and state. Since the module to be loaded when I click the tile of my extension project, “cus.crm.opportunity.Component.js”, has error state ( 5 ), the corresponding error is raised.
Why this Component.js file is needed when I click the tile
from the callstack we can find the answer:
(1) UI controller has a method openApp, which will call render method.
(2) render method will further delegate the call to load component via sap.ui.component.load:
What is negative cache
Let me copy the definition from wikipedia:
In computer programming, negative cache is a cache that also stores “negative” responses, i.e. failures. This means that a program remembers the result indicating a failure even after the cause has been corrected. Usually negative cache is a design choice, but it can also be a software bug.
I am glad today I know a new terminology.
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2718724/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP UI5 CSS 類 sapUiSmallMarginEnd 的工作和新增原理UICSS
- SAP UI5 裝置型別檢測 Device API 的工作原理UI型別devAPI
- SAP UI5 應用 SimpleForm 控制元件 ResponsiveGridLayout 佈局的工作原理深入剖析UIORM控制元件
- SAP UI5 應用的螢幕尺寸檢測工作原理深入剖析試讀版UI
- SAP Spartacus NgExpressEngineDecorator 的工作原理Express
- SAP UI5 Library Resource Bundle 的設計原理UI
- SAP GUI裡Screen Painter的工作原理GUIAI
- SAP Spartacus 預設路由配置的工作原理路由
- 使用 TypeScript 編寫 SAP UI5 應用的準備工作TypeScriptUI
- 深入學習SAP UI5框架程式碼系列之六:SAP UI5控制元件資料繫結的實現原理UI框架控制元件
- SAP UI5 的前世今生UI
- 關於 SAP UI5 裝置型別檢測的實現原理UI型別
- SAP UI5的support AssistantUI
- SAP UI5 的 TypeScript 實踐UITypeScript
- SAP UI5 應用裡 FlexBox 控制元件的設計原理UIFlex控制元件
- com.sap.ui5.resource.ResourceServlet的工作原理介紹UIServlet
- SAP Fiori @OData.publish 註解的工作原理解析
- 深入介紹 UI5 框架裡 Smart Field 控制元件的工作原理UI框架控制元件
- Buffer Cache 原理
- EventBus in SAP UI5 and KymaUI
- SAP UI5 應用 index.html 裡定義的 data-sap-ui-theme 值的載入原理UIIndexHTML
- SAP UI5 應用的 OData 後設資料請求的傳送原理分析UI
- SAP UI5 應用 index.html 裡引導 script 屬性的解析原理UIIndexHTML
- SAP UI5 sap.ui.Device.media 的使用介紹UIdev
- SAP UI5 sap.ui.core.Element 的概要介紹UI
- 如何理解 SAP UI5 的 sap.ui.define 函式UI函式
- [ChatGPT 勘誤] SAP UI5 的 sap.ui.base.ObjectChatGPTUIObject
- SAP UI5 ManagedObject 的 Association 講解UIObject
- SAP UI5 ManagedObject 的 Event 講解UIObject
- Buffer cache的執行原理
- SAP UI5 sap.ui.layout.Grid 控制元件寬度百分比的設定原理UI控制元件
- word2vec原理(三) 基於Negative Sampling的模型模型
- SAP UI5 應用的 OData 後設資料請求響應的解析原理分析UI
- SAP ABAP SQL的execution plan和cacheSQL
- SAP UI5框架自學教程UI框架
- SAP UI5 初學者教程之二十 - SAP UI5 的表示式繫結用法講解UI
- SAP UI5 初學者教程之六 - 瞭解 SAP UI5 的模組(Module)概念試讀版UI
- iOS SDWebImgae Cache原理iOSWeb