Lets say I implement some caching on cloud run start, like google suggests in its own documentation: https://cloud.google.com/run/docs/tips/general#using_global_variables
But my data sometimes change and I would like to update the cache. Since cloud run cannot do async task in the background, my only option is to tell cloud run to kill all the instances and create new ones.
How to do that without deploying a new revision?
Or can I deploy new revision without building a new container?
Thank you
For time-based refresh, you can mark instance start time in some global state inside your container. Then you can configure healthchecks for your CloudRun instance to check current vs start time and report as unhealthy if it's time to be replaced.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With