Skip to main content

Module cache

Module cache 

Source
Expand description

Key-value caching with in-memory and Redis backends.

Provides the StorageAccess trait for get/put/invalidate/clear, the InMemoryStorageAccess process-local map, the RedisStorage async Redis helper, the region-scoped RedisStorageAccess JSON cache with TTL, and the InMemoryRegionFactory/RedisRegionFactory region registries.

Use the in-memory backend for single-process caches and the Redis backend for shared caches; use region factories when separate namespaces are needed.

Structs§

InMemoryRegionFactory
Registry of named in-memory regions sharing one factory.
InMemoryStorageAccess
Process-local cache backed by a locked hash map.
RedisRegionFactory
Registry of named Redis regions sharing one RedisStorage.
RedisStorage
Async Redis helper for strings, hashes, lists, sets, and sorted sets.
RedisStorageAccess
Region-scoped Redis cache storing JSON-serialized values with a TTL.

Enums§

CachingStrategy
Selects which cache backend is configured.

Traits§

StorageAccess
Synchronous key-value cache interface.