Actions Cache Consistency Between Executions
Last Updated:
Overview
However, sometimes the cache does not seem to persist across executions (different login flows, for example), even within this period or shorter:
- Set a dummy item, such as a token in a Post Login Action cache from one Action api.cache.set(key, value, [options]);
- Perform a second login (or multiple) trying to get the cached value api.cache.get(key) and notice that it may not be present in all of the runs.
Applies To
- Actions cache
Cause
The cache should be available for all actions in the same flow for a single execution reliably, however for subsequent executions (e.g. a different flow, another user login, or a user returning from a redirect action) it is not guaranteed.
Cached items have a maximum lifetime of 24 hours but it could be less than this. This is mentioned in Actions Cache Consistency between Different Actions, and here.