Expand description
HTTP/parse cache under XDG (one-shot L1 + SQLite L2). HTTP / parse cache under XDG (PRD 5AF / GAP-011 / GAP-023).
Backends: in-process L1 (HashMap), SQLite under XDG cache. Redis is optional
via config set cache_backend=redis + cache_redis_url (never env).
Structs§
- Cache
Entry - Cached payload.
- Cache
Key - Cache key derived from method + URL + optional body hash.
- Layered
Cache - Layered L1 memory + L2 sqlite.
- Memory
Cache - In-process L1 cache (dies with the process — one-shot safe).
- Redis
Cache - Redis-backed cache (RESP over TCP). Enabled when
config set cache_backend redisandcache_redis_urlis set (XDG only). - Sqlite
Cache - SQLite-backed cache under XDG cache directory.
Traits§
- Http
Cache - Trait for one-shot HTTP/parse caches.
Functions§
- default_
cache - Build the product cache from XDG
cache_backend(sqlite|memory|redis). - expires_
after - TTL helper: now + duration.
- sqlite_
layered_ cache - Layered only (tests / explicit sqlite path).