simple

Modulefastly 0.13.1

fastly::cache::simple

The Compute Simple Cache API.

This is a non-durable key-value API backed by the same cache platform as the Core Cache API.

Cache scope and purging

Cache entries are scoped to Fastly points of presence (POPs): the value set for a key in one POP will not be visible in any other POP.

Purging is also scoped to a POP by default, but can be configured to purge globally with Fastly's purging feature.

Interoperability

The Simple Cache API is implemented in terms of the Core Cache API. Items inserted with the Core Cache API can be read by the Simple Cache API, and vice versa. However, some metadata and advanced features like revalidation may be not be available via the Simple Cache API.

Structs

CacheEntryThe return type of the closure provided to get_or_set_with().
PurgeOptionsOptions for purge_with_opts().

Enums

CacheErrorErrors arising from cache operations.

Functions

getGet the entry associated with the given cache key, if it exists.
get_or_setGet the entry associated with the given cache key if it exists, or insert and return the specified entry.
get_or_set_withGet the entry associated with the given cache key if it exists, or insert and return an entry specified by running the given closure.
purgePurge the entry associated with the given cache key.
purge_with_optsPurge the entry associated with the given cache key.