The cache().fetch
method is used to get a value from the cache or
calculate it if it's not there.
The function expects the key, the TTL, and a function that will be called to calculate the value if it's not in the cache.
The cache key to use, always prefixed by cache:
The cache().fetch
method is used to get a value from the cache or
calculate it if it's not there.
The function expects the key, the TTL, and a function that will be called to calculate the value if it's not in the cache.
The cache key to use, always prefixed by cache:
The time-to-live for the cache, in seconds
The function to call if the cache is not found
Protected
getThe cache().purge
method is used to remove a key from the cache.
The cache key to delete, always prefixed by cache:
Cache functions result in your Edge-first applications.