A read-only property that gives you the KVNamespace
used by the Cache object.
The namespace can be used to access the KVNamespace directly in case you need to integrate with it.
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
get
Cache functions result in your Edge-first applications.