Excuse me, does anyone know the cache update polic...
# spicedb
l
Excuse me, does anyone know the cache update policy of spicedb? Does it actively pull the very data into the cache every time it's written? Does spicedb set the expiration time of the cache?
v
The usage of the cache is governed by the
quantization window
, which is used to select the snapshot timestamp based on it. By default it's set to 5 seconds. So data is only pulled when not present, and given that cache keys have the timestamp as part of it, one the
quantization window
elapses, SpiceDB will start pulling data from the datastore again. SpiceDB sets the TTL of the cache to 2x the
quantization window
You can read more about SpiceDB's hotspot caching strategy in Jake's new blog post: https://authzed.com/blog/hotspot-caching-in-google-zanzibar-and-spicedb