Skip to main content

Module cache

Module cache 

Source
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§

CacheEntry
Cached payload.
CacheKey
Cache key derived from method + URL + optional body hash.
LayeredCache
Layered L1 memory + L2 sqlite.
MemoryCache
In-process L1 cache (dies with the process — one-shot safe).
RedisCache
Redis-backed cache (RESP over TCP). Enabled when config set cache_backend redis and cache_redis_url is set (XDG only).
SqliteCache
SQLite-backed cache under XDG cache directory.

Traits§

HttpCache
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).