Proxy cache zone maximal size

footplus nginx-forum at
Mon Oct 26 13:01:52 UTC 2015


When using nginx in proxy_cache mode, and configuring the cache zone like
below, it seems that the zone sometimes exceed the configured size by like
10%; I'm buffering new items at a high rate, and I'm wondering how this
cache zone is cleaned up ? Is there a time-based recurring size check ? or
another mechanism ?

I also noticed that the cache doesn't seem to be cleaned before the cache
loader process has completed all the cache items. Is this a normal behavior

My goal is to set the max_size to a "safe" value, to ensure that the cache
space is never saturated.

proxy_cache_path /run/store keys_zone=cache-memory:500m

Thanks !
Best regards,

Posted at Nginx Forum:,262459,262459#msg-262459

More information about the nginx mailing list