Module redis

Module redis 

Source
Expand description

Redis storage backend for L2 cache.

Content-type aware storage using RedisJSON (Redis Stack):

  • JSON content โ†’ JSON.SET with full structure preserved โ†’ RedisSearch indexable!
  • Binary content โ†’ Redis STRING (SET) for efficient blob storage

JSON documents are stored with a clean, flat structure:

{
  "version": 1,
  "timestamp": 1767084657058,
  "payload_hash": "abc123...",
  "payload": {"name": "Alice", "role": "admin"},
  "audit": {"batch": "...", "trace": "...", "home": "..."}
}

This enables powerful search with RediSearch ON JSON:

FT.CREATE idx ON JSON PREFIX 1 sync: SCHEMA $.payload.name AS name TEXT
FT.SEARCH idx '@name:Alice'

Structsยง

RedisStore