Enable Storable Actions in an Application

Storable actions are automatically configured in Lightning Experience and Salesforce1. To use storable actions in a standalone app (.app resource), you must configure client-side storage for cached action responses.

To configure client-side storage for your standalone app, use <auraStorage:init> in the auraPreInitBlock attribute of your application’s template. For example:

<aura:component isTemplate="true" extends="aura:template">
    <aura:set attribute="auraPreInitBlock">
        <auraStorage:init
          name="actions"
          persistent="false"
          secure="true"
          maxSize="1024"
          defaultExpiration="900"
          defaultAutoRefreshInterval="30" />
    </aura:set>
</aura:component>
name
The storage name must be actions. Storable actions are the only currently supported type of storage.
persistent
Set to true to preserve cached data between user sessions in the browser.
secure
Set to true to encrypt cached data.
maxsize
The maximum size in KB of the storage.
defaultExpiration
The duration in seconds that an entry is retained in storage.
defaultAutoRefreshInterval
The duration in seconds before an entry is refreshed in storage.

For more information, see the Reference Doc App.

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.