Cache adapter interface for pluggable storage backends.
All methods are async to support Redis, IndexedDB, and other async backends. Adapters handle their own LRU eviction and cleanup logic.
The type of cached values
Readonly
Current number of cached items (may include expired items).
Remove all cached items.
Remove specific key. Returns true if existed.
Retrieve cache item by key. Returns undefined if missing.
Check if key exists (may still be expired - adapter handles expiration).
Store cache item with given key.
Cache key
Cache item with value and metadata
Optional
Optional expiration timestamp for backends like Redis
Cache adapter interface for pluggable storage backends.
All methods are async to support Redis, IndexedDB, and other async backends. Adapters handle their own LRU eviction and cleanup logic.