cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Bootstrap Script Query For Application Cache Buster

rauf_shaikh
Active Participant
0 Kudos

Hi,

I am trying to implement Application Cache Buster. I am following Fiori Wave2 application structure.
As Demokit says "To activate the Application Cache Buster the configuration data-sap-ui-appCacheBuster="./" must be added to the bootstrap script of the application page"

But I don't get where to add the said configuration. I have Component.js(extends ComponentBase), Configuration.js, Main.view.xml and Main.controller.js. I am using "fioriSandboxConfig.json" to run the application.

Any idea where to add the AppCacheBuster configuration?

Kind regards,

Rauf

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member226851
Participant
0 Kudos

Hi Rauf,

I've faced the same issue recently. Have you already found a working solution?

Best regards,

Tomasz Sobkowiak

rauf_shaikh
Active Participant
0 Kudos

Hi Tomas,

No, I did not get solution for this.

Regards.

former_member226851
Participant
0 Kudos

Hi Rauf,

you may try to implement ApplicationCacheBuster directly in the Component.js file as follow:


onAfterRendering : function() {

sap.ui.core.AppCacheBuster.init();
sap.ui.core.AppCacheBuster.register("/sap/bc/ui5_ui5/sap/<APP_NAME>");

}


However, I've noticed that SAP recommends to activate cachebuster in Launchpad instead of activating it each time per different app:

SAP Fiori - Cache Management: Clearing caches a... | SCN

SAP Fiori Launchpad - SAP Library

Hope it will help!

Best regards,

Tomasz

rauf_shaikh
Active Participant
0 Kudos

Hi Tomas,

Thanks..will surely give it a try.

Regards.

WouterLemaire
Active Contributor
0 Kudos

I think you have to add it to your index.html:

<script src="https://sapui5.hana.ondemand.com/sdk/resources/sap-ui-core.js"

  id="sap-ui-bootstrap"

  data-sap-ui-libs="sap.m"

  data-sap-ui-theme="sap_bluecrystal"

  data-sap-ui-appCacheBuster="./">

  </script>

Kind regards,

Wouter

rauf_shaikh
Active Participant
0 Kudos

Hi Wouter,

Thanks for your reply.

But I am using ComponentBase (see this) hence there is no index.html, instead Component Creates content using a xml view.

Regards,

Rauf

SandipAgarwalla
Active Contributor
0 Kudos

i believe in that case the fiori local snadbox index.html has to implement the cache buster, or you cache menifest mechanism route.