Default consistency level for SpiceDB cached permission checks
0 reputation · 12 May 2020, 06:01 UTC
SpiceDB maintains a caching layer for relationship tuples and permission checks to reduce latency for repeated access patterns. When a read request omits a consistency token, the server may return a result retrieved from this cache, which can represent a permission state that does not include recent write operations. This behavior enables the fastest possible response but may produce stale results.
The platform offers the at_least_as_fresh_as consistency level, which accepts a Zookie or ZedToken to enforce that returned data is not older than a specified causal point. However, the default freshness guarantee when no token is supplied -- specifically how the server decides between cached and freshly computed results -- is not explicitly documented, creating ambiguity for operators seeking predictable freshness behavior.
- What mechanism determines whether a cached result is served over a fresh computation when no consistency token is present?
- Is there a server-side configuration to establish a minimum freshness baseline for all permission reads?
- How does the default freshness behavior scale under high-frequency update workloads?