How does Nginx look-up cached resource?

Sergey Brester serg.brester at sebres.de
Thu Sep 10 15:54:45 UTC 2015


On 10.09.2015 17:33, Maxim Dounin wrote:

> Hello!
> 
> On Thu, Sep 10, 2015 at 05:07:36PM +0200, Sergey Brester wrote:
> 
>> Leave header format unchanged (I mean changes in header file 
>> 'src/http/ngx_http_cache.h'), but not calculate and not compare crc32 
>> (unused / reserved up to "change cache header format next time")?
> 
> Even that way resulting cache files will not be compatible with
> older versions which do the check, thus breaking upgrades (when
> cache items can be used by different versions simultaneously for a
> short time) and, more importantly, downgrades (which sometimes
> happen due to various reasons).

In this case (someone will downgrade back to previous nginx version) the 
cache entries will be invalidated by first use (because crc32 will not 
equal) - well I think it's not a great problem.

Please find enclosed a changeset (2nd) that should restore backwards 
compatibility of cache header file (forwards).

Regards,
sebres.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _sb-secure-cache-fix.patch
Type: text/x-diff
Size: 5089 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150910/72e5b4a9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _sb-secure-cache-fix2.patch
Type: text/x-diff
Size: 996 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150910/72e5b4a9/attachment-0001.bin>


More information about the nginx-devel mailing list