Hi can somebody help me understand how
# spicedb
m
Hi can somebody help me understand how cache usage is affected when we use caveats in spiceDB. For example if we have an expression permission a = (combination of other permission) & caveat What part is cached? Will the Boolean exp part (combination of other permission) Be cached? Is there any caching of caveat? Are other permission that don't use caveat cached? I have hard time understanding this...
Copy code
caveats are designed leverage SpiceDB's distributed caching layer. SpiceDB caches the caveat expressions themselves, so that it can instantly determine what needs to be executed for a particular request. With this, our goal to maintaining properties of scale and latency is met for schemas using caveats.
This is from authzed docs
y
so one thing is that a caveat is always a part of a relation
you won't have
(combo of other permissions) & caveat
because a caveat is attached to a relation:
user with some_caveat
the results of caveat computations are cached
you should generally expect that caveats will make results harder to cache, but that results will be re-used where they can