打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
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.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存
猜你喜欢
类似文章
游云南西双版纳总佛寺(3)
一定要记住的28条人性干货,看完让人成熟!
老师不会,社会不教,父母不懂,懂的人更不会告诉你的杀心真相!1,
烽火岁月吐真言(诗一首)
摄影:艺术体操演(1)
金钱和价值,能力和实力,才是你的底气
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服