字节跳动 canal安装 razor webview vue钩子函数 nginx视频教程 jquery的each遍历方法 linux 获取系统时间 js对象添加元素 java获取字符串 磁盘清理会误删东西吗 axure导出html文件 手动安装fastboot驱动 linux查询文件内容 mysql将时间戳转换成日期 python3正则表达式 python如何实现多线程 python的安装 python正则表达 python正则表达式语法 python零基础 javasocket通信 java接口实现 java程序 java获取url参数 javascript实例 din字体下载 unity3d下载 虚拟打印机安装 多面硬币 华为ff 微信临时链接多久失效 dnf瞎子传说套选择 go程序设计语言 小米9截屏 小米8游戏模式 android下载文件 易语言皮肤模块 cad拉伸命令 ps画笔颜色
当前位置: 首页 > 学习教程  > 编程语言

SAP UI5 Negative cache的工作原理

2020/8/11 20:57:35 文章标签:

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的原创文章,请关注公众号"汪子熙":

汪子熙 CSDN认证博客专家 前端框架 Node.js SAP
JerryWang,2007年从电子科技大学计算机专业硕士毕业后加入SAP成都研究院工作至今。Jerry是SAP社区导师,SAP中国技术大使。2020年5月下旬,Jerry做了脑部肿瘤的开颅切除手术,对编程和人生又有了新的感悟。

本文链接: http://www.dtmao.cc/news_show_100448.shtml

附件下载

相关教程

    暂无相关的数据...

共有条评论 网友评论

验证码: 看不清楚?