Enable Storable Actions in an Application
To use storable actions in a standalone app (.app resource), you must configure client-side storage for cached action responses.
Client-side storage is automatically configured in Lightning Experience and the Salesforce mobile app. A component shouldn’t assume a cache duration because it may change as we optimize the platform.
To configure client-side storage for your standalone app, use <auraStorage:init> in the auraPreInitBlock attribute of your application’s template. For example:
The storage name must be actions. Storable actions are the only currently supported type of storage.
Set to true to preserve cached data between user sessions in the browser.
Set to true to encrypt cached data.
The maximum size in KB of the storage.
The duration in seconds that an entry is retained in storage.
The duration in seconds before an entry is refreshed in storage.
Storable actions use the Storage Service. The Storage Service supports multiple implementations of storage and selects an adapter at runtime based on browser support and specified characteristics of persistence and security.
See Also