This image describes the sequence of callback execution for storable
actions.
Cache Miss
If the action is not a cache hit as it doesn’t match a storage entry:
- The action is sent to the server-side controller.
- If the response is SUCCESS, the response is added
to storage.
- The callback in the client-side controller is executed.
Cache Hit
If the action is a cache hit as it matches a storage entry:
- The callback in the client-side controller is executed with the cached action response.
- If the response has been cached for longer than the refresh time, the storage entry is
refreshed.
When an application enables storable actions, a refresh time is configured. The
refresh time is the duration in seconds before an entry is refreshed in storage. The refresh
time is automatically configured in Lightning Experience and Salesforce1.
- The action is sent to the server-side controller.
- If the response is SUCCESS, the response is added
to storage.
- If the refreshed response is different from the cached response, the callback in the
client-side controller is executed for a second time.