Skip to main content

Module cache

Module cache 

Source
Expand description

TTL-based caching with stale-while-revalidate semantics.

This module provides a thread-safe cache with time-to-live (TTL) expiration and the ability to serve stale data during refresh failures.

Structsยง

SingleValueCache
A single-value cache with TTL, useful for caching expensive one-off computations like bootstrap data.
TtlCache
Thread-safe TTL cache with stale-while-revalidate semantics.