Module fastly::cache::simple

source ·
Expand description

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.

Re-exports§

Structs§

Enums§

Functions§

  • Get the entry associated with the given cache key, if it exists.
  • Get the entry associated with the given cache key if it exists, or insert and return the specified entry.
  • Get the entry associated with the given cache key if it exists, or insert and return an entry specified by running the given closure.
  • Purge the entry associated with the given cache key.
  • Purge the entry associated with the given cache key.