on 01-17-2021 10:35 AM
Hi,
while working with custom ObjectPage sections using extension, i ran into caching issues to be able to see my changes inside the browser.
After some investigations (and a nice hint on twitter) i figured out, that the underlying sapui5 cache is the reason for this, because the custom extensions are cached in the browser indexedDB storage.
To get rid of this, i am using the following line inside my Component.js
// disable ui5 cache for reuse components while developing
sap.ui.getCore().getConfiguration().setUI5CacheOn(false);
Is there a better way of controlling this feature while developing?
If not, i will wrap this at least in an if like (location.host === 'localhost') to avoid prod issue without cache.
Best Regards
Holger
Hi Holger,
exactly the outcome of the Fiori elements templates (including the custom sections) are cached for better performance.
During development you can just add the following URL parameter: sap-ui-xx-viewCache=false
(see also https://openui5.hana.ondemand.com/topic/91f2d03b6f4d1014b6dd926db0e91070.html)
I hope this helps you.
Best regards,
Marcel Wächter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcel,
unfortunately I can't find the parameter sap-ui-xx-viewCache=false easy on the page you've provided. Only when I search with viewCache in the experimental flags it is found. If I google for sap-ui-xx-viewCache=false I land at:
Cache Behavior for Application Resources
which documents the parameter sap-ui-xx-devmode. Which is only documented there. I've tested it but it seems to have no effect.
Can you please clarify?
Best Regards
Gregor
Hi Gregor,
luckily in the meantime, the generators put this into the start scripts of the package.json:
"start-local": "fiori run --config ./ui5-local.yaml --open \"test/flpSandbox.html?sap-ui-xx-viewCache=false#project1-tile\"",
but i can also be used it in a localIndex.html file besides additional dev settings
<script id="sap-ui-bootstrap"
... data-sap-ui-xx-viewCache="false"
Just to have the full picture, if you land on this site 😉
Regards
Holger
User | Count |
---|---|
81 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.