How to set the Nginx cache limit dynamically?

10/27/2021

I have the max_size field in the proxy_cache_path in the Ngnix config file.

If I want to set the max_size field dynamically based on the environment we use, like 10Gb for Production or, 8 Gb for QA2/STG, is there a way to implement it?

I tried accessing the route & setting the value but that didn't work.

-- Naveen Penki
caching
configuration
kubernetes
nginx

0 Answers