Inner workings of nginx cache manager

Maxim Dounin mdounin at mdounin.ru
Fri Nov 30 12:58:13 UTC 2018


Hello!

On Fri, Nov 30, 2018 at 01:26:27PM +0100, Stefan Safar wrote:

> So the process/thread that scans through the files on disk need to read the
> all the file headers to find the KEY for the all cache files to keep the
> information in memory before it starts deleting anything, is that correct?

No, cache loader only scans which files are present in the cache 
(and their sizes), it doesn't try to read them.  Raw keys as 
stored in cache file headers are only needed for a safety check to 
make sure there are no MD5 collissions between different keys, and 
this check only happens when returning an actual response from the 
cache.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list