<@U02874JL5D3> thanks for replying to my email. i ...
# help
@Charith (Cerbos) thanks for replying to my email. i have a few other questions related to the cache. 1. Does the Reload Store simply clear the cache on an instance? 2. Does reloading taking longer the more policies that you have defined in the store? i.e. what does the big-O runtime look like? 3. Would be nice to have an endpoint with the ability to purge a specific item from the cache so that we can get the best of both worlds: a longer
along with a more granular way of keeping the cache fresh. (this is more of a feature request vs. a question)
Hey! Welcome to the Cerbos Slack community. Answers below. 1. Yes 2.
. It doesn't depend on the number of policies you have in your store -- only the number that's currently cached. 3. Thanks for the suggestion. We'll consider it.
One thing to note is that in most cases, the compile time of Cerbos policies is negligible. So, clearing the cache doesn't have a drastic effect on performance.
so is it generally ok to call Reload Store as frequently as polices are added?
potentially multiple times per minute for us since we need near-realtime updates
It should be fine in general. I'd recommend monitoring your response times to see whether it's having a negative impact. BTW, you only need to reload the store if you have multiple instances. On a single instance, when you use the Admin API the affected policies are automatically refreshed.
yes, we plan on running multiple instances for availability/fault tolerance reasons
do you have more info on how to set up this deployment model?
is it simply just pointing all the instances to the same data store?
Yes. Just share the same configuration file with all instances.
ok thanks for your help!