https://cerbos.dev logo
#help
Title
# help
o

Owen Cummings

06/15/2023, 6:58 PM
Curious about the Cerbos Config
compile.cacheDuration
setting. Is there a way to set this to infinite? They default value is 1 minutes, does this mean that Cerbos is recompiling my policies every minute? The way I am using Cerbos is building a Docker image with my policies in the image and using the disk driver, so they never change unless I redeploy a new version of the image. Would there be any performance benefit to caching forever?
c

Charith (Cerbos)

06/15/2023, 7:15 PM
Hey,
compile.cacheDuration
is infinite by default. Caching is on-demand. So setting it to one minute doesn't mean that Cerbos compiles all your policies every minute. It just recompiles a single policy if it is requested and if it has been evicted from the cache.
o

Owen Cummings

06/15/2023, 7:15 PM
Ah!