Show TOC

Cache Buster for SAP FioriLocate this document in the navigation structure

Web browsers store static resources, like JavaScript files, stylesheets, and images in the browser cache. When these resources are changed on the server in a software upgrade, you want the browser to load the new resources from the server rather than from the cache, without having to manually clear the browser cache.

Cache buster techniques cause web browsers to load content from the server rather than from the browser cache when new resources are available on the server.

The cache buster for the SAP Fiori launchpad and SAP Fiori apps is based on versioned URLs. Cache buster tokens are added to the URLs of the resources. After a software update, URLs containing new tokens are used, which means that the browser considers these URLs as initial requests and loads the new resources from the server.

The advantage of this approach is that resources in the cache are only reloaded when a new version is available. Rather than simply limiting the time a resource may remain in the browser cache, the system invalidates the cache only when resources are actually updated on the server.

Note

Do not use the SAPUI5 application cache buster for SAP Fiori apps. You can find the latest information on the cache buster for SAP Fiori components in SAP note 2043432 Information published on SAP site.

Note

As an alternative to the cache buster, you can also invalidate the client cache by customizing the HTTP response headers. This solution allows you to invalidate SAPUI5 resources at regular time intervals, for example every Sunday night. For more information on this alternative solution, see SAP Note 2075016 .

Activating the Cache Buster

The cache buster for SAP Fiori launchpad and SAP Fiori apps is enabled by the SICF service /sap/bc/ui2/flp. Make sure that this service is active. For more information, see SICF Services.

Furthermore, you have to schedule the Calculation of SAPUI5 Application Index for SAPUI5 Repositories report (/UI5/APP_INDEX_CALCULATE) to run at regular intervals. For more information, see SAPUI5 Application Index.

Cache Buster Behavior depending on Resource Type

The cache buster for SAP Fiori implements the SAPUI5 cache-buster mechanism. Cache buster tokens are added to the following types of resources:

Table 1:

Type

Description

SAPUI5 library resources

For these resources, which are located in the MIME repository, you only need to activate the cache buster as described below. This only needs to be done once. After you have done this, the build timestamp of the last deployed SAPUI5 version is added to the URLs of these resources.

SAP Fiori apps and SAP Fiori libraries which are deployed in the SAPUI5 repositories

The SAP Fiori launchpad can generate specific cache buster tokens for individual SAP Fiori apps and SAP Fiori libraries. The advantage of this approach is that the browser only reloads those applications that have been updated on the server.

To identify updated applications, the SAP Fiori launchpad uses the SAPUI5 application index on the ABAP front-end server. The SAPUI5 application index itself is updated by the ABAP program Calculation of SAPUI5 Application Index for SAPUI5 Repositories (/UI5/APP_INDEX_CALCULATE). We recommend that you schedule this program to run at regular intervals. For more information, see SAPUI5 Application Index.

Other SAPUI5 application resources

These resources include classic SAPUI5 applications which are not implemented as SAPUI5 components or which are no application libraries. In the context of SAP Fiori, such applications contain implementations for SAP Fiori launchpad tiles.

For these application resources, the SAP Fiori launchpad uses a global cache buster token, which is not application-specific and needs to be updated manually. If the SAPUI5 application index is incomplete, the missing applications also get the global cache buster token.

You can manually invalidate the cache for such resources by running the ABAP program /UI2/INVALIDATE_CLIENT_CACHES. For more information, see Invalidating Client Caches.

URL Parameters for the SAP Fiori Launchpad

The following URL parameters are available:

Table 2:
Parameter Description

sap-ushell-nocb

To deactivate cache busting in your web browser, set this parameter to "true".

This is only needed for troubleshooting purposes.

sap-ushell-cb-nocache

To improve performance, the SAPUI5 cache buster tokens themselves are cached on the front-end server, with a validity of two hours. If you need to bypass this server-side cache, set this parameter to "true".

Restrictions

No cache buster tokens are added to the following resources:

  • URLs of SAPUI5 demo kit apps.
  • SAPUI5 debug resources (when you use the URL parameter sap-ui-debug=true).

Developers, testers, and administrators who use these resources must manually clear the browser cache.

SAP Gateway Caches

You may also want to clear SAP Gateway caches, for example if you did any changes to OData services. For more information, see the SAP Gateway documentation at Start of the navigation path http://help.sap.com/nwgateway Next navigation step Application Help Next navigation step SAP Gateway Developer Guide Next navigation step OData Channel Next navigation step Basic Features Next navigation step Service Life-Cycle Next navigation step Metadata Cache End of the navigation path