The CacheManager plugin provides the ability to cache
resources persistently and manage the lifecycle of SAP
UI5 resources.
Using this plugin, you can maximize the performance of online SAP UI5 applications. This is achieved by caching to disk the responses that are received by the webview according to their response headers. CacheManager then maintains and periodically checks for manifest files that tell whether resources for an app has been updated. When an update is found, the cache is purged.
Adding and Removing the CacheManager
The CacheManager plugin is added and removed using the Cordova CLI.
To add the CacheManager plugin to your project, use the following command:
cordova plugin add kapsel-plugin-cachemanager
To remove the CacheManager plugin from your project, use the following command:
cordova plugin rm kapsel-plugin-cachemanager
Using this plugin, you can maximize the performance of online SAP UI5 applications. This is achieved by caching to disk the responses that are received by the webview according to their response headers. CacheManager then maintains and periodically checks for manifest files that tell whether resources for an app has been updated. When an update is found, the cache is purged.
Adding and Removing the CacheManager
The CacheManager plugin is added and removed using the Cordova CLI.
To add the CacheManager plugin to your project, use the following command:
cordova plugin add kapsel-plugin-cachemanager
To remove the CacheManager plugin from your project, use the following command:
cordova plugin rm kapsel-plugin-cachemanager
Events
cacheinvalidated
Event fired when CacheManager has it's cache invalidated.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
type |
string | The name of the event. Value will be cacheinvalidated. |
Example
sap.CacheManager.addEventListener('cacheinvalidated',
function(e) { console.log("Cache is
invalidated"); });
noviewerfound
Event fired when CacheManager is unable to display a
particular mime type because there is no view for that
type installed on the device.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
type |
string | The name of the event. Value will be noviewerfound. |
Example
sap.CacheManager.addEventListener('noviewerfound',
function(e) { console.log("No viewer
installed"); });