Skip to main content

Module redis_cache

Module redis_cache 

Source
Expand description

Shared response cache over a declared stores: entry.

One redis hash per entry: status, headers (JSON) and body (raw bytes). Redis values are binary-safe, so the body is stored as-is – base64 would inflate every cached response by a third, and a JSON wrapper would escape it on top of that.

Structs§

RedisResponseCache

Constants§

UNLINK_BATCH 🔒
Keys per UNLINK. Small enough that no single round trip holds the server long; large enough that a big purge is not thousands of them.

Functions§

cache_key 🔒
The redis key for a cache entry.
escape_glob 🔒
Backslash-escapes every glob metacharacter Redis’s MATCH understands.