blackbull.middleware.cache¶
blackbull.middleware.cache
¶
Response caching middleware (RFC 9111 — HTTP Caching).
Caches successful GET/HEAD responses in a per-worker, in-memory LRU and
replays them without running the handler. It reads Cache-Control in both
directions, generates a weak ETag when the handler supplies none, answers
If-None-Match with a 304, and keys variants by Vary. There is no
invalidation API and nothing is shared between workers: restart the worker, or
wait out the lifetime. docs/guide/middleware.md tabulates the constructor.
Cache
¶
Per-worker in-memory response cache.