Proxy cache max size

Maxim Dounin mdounin at
Fri Jun 29 13:55:46 UTC 2012


On Fri, Jun 29, 2012 at 11:28:08PM +1000, mat999 at wrote:

> I have a question. If the file being written to a cache exceeds max size what behavior happens? As I can think of it there are 3 possible outcomes.
> 1. File is written and later cleaned up by the cache manager (bad)
> 2. File isnt written. It is recognized that it can't be cached.
> 3. The file is written and truncated (bad)
> Thanks

The file is written, and later cleaned up by the cache manager.

It might even be used for a while to serve requests, as it takes 
some time (up to 10 seconds) for the cache manager to recognize 
the max_size limit was exceeded and least recently used files 
should be removed from the cache.

Maxim Dounin

More information about the nginx mailing list