Threetone does not expose a user-configurable Redis context connector or a released session path that consumes this cache. Existing dynamic variables are saved authoring values. This cookbook describes a cache your application would own.
Before you begin
Have an authenticated application backend, a managed Redis owner, and an approved list of cacheable fields. Decide the maximum age of each field and what happens when it is missing.1
Scope keys on the server
Derive the workspace and user identifiers from authenticated server context. Include them in the cache namespace and never accept an unrestricted Redis key from a client. Store a source version and fetch timestamp with values that can become stale. A cache hit does not grant access to the source record.
2
Restrict the Redis connection
Follow Redis security guidance for network isolation, ACLs, and TLS. Permit only the required commands and key patterns. Keep Redis credentials on the backend, outside prompts, browser bundles, mobile apps, and ordinary agent variables.
3
Set expiration with each write
Redis
SET supports an expiration on the same write, such as EX in seconds. Choose the duration from the data’s freshness requirement. Review overwrite behavior so a refresh does not accidentally leave a key without expiry. Handle a cache miss by rechecking authorized source data or returning an explicit unavailable result.4
Test stale and repeated work
Plan for Redis outage, revoked source access, concurrent refreshes, and delayed results. Never reuse one user’s context for another as a fallback. A temporary
SET NX marker can coordinate work, but expiration or eviction means it cannot prove an external action executed exactly once.Frequently asked questions
Does a cache TTL enforce Threetone retention?
Does a cache TTL enforce Threetone retention?
No. It controls that Redis key’s expiry. Other copies and Threetone retention enforcement have separate lifecycles and limitations.
Can a cache miss use the last available customer's data?
Can a cache miss use the last available customer's data?
No. Keep identity boundaries intact. Fetch authorized data for the current user or report that context is unavailable.