Cache Setup v4
Cache retrieved data for quick access.
This setup guide is the legacy documentation for SA4.
Usage Notes v4
Setup involves three parts;
Setting up the cache, and defining your cached values
A custom function to calculate your defined values, which is called when the uncached data needs to be created.
Cache retrieval, which retrieves the data either from the cache (if available) for generates it (if needed)
Setup the Cache
Place this code in your site or page level /body code,
Define as many cached values as you want, giving them each a unique name. These are defined beneath val
, as properties.
Access your Data
When you need to retrieve that value, call cache.getAsync()
. In the .then()
, you can use your data how you want as soon as it's available.
Configure your Data Retrieval functions
This is your custom code async
function for calculating the value, if it's not already in the cache.
STEP 1 - Add the Library
See above, and the feature-specific sub pages for details.
Last updated