Protocol for cache backend implementations.
Summary
Functions
Fetch a single value by key. Returns nil on miss.
Fetch multiple values at once. Returns map of found key-value pairs.
Return a unique identifier for this handler type.
Store a value, optionally with a TTL in seconds.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
Fetch a single value by key. Returns nil on miss.
Fetch multiple values at once. Returns map of found key-value pairs.
Return a unique identifier for this handler type.
@spec set(t(), String.t(), String.t(), non_neg_integer() | nil) :: :ok
Store a value, optionally with a TTL in seconds.