Welcome! Log In Create A New Profile

Advanced

[PATCH] Apply cache locking behaviour to stale cache entries.

Elliot Thomas
December 03, 2018 07:12AM
Hello,

This patch applies cache locking behaviour to stale cache entries, so
in the case where the *_cache_lock directives are used, the same
locking behaviour is used for stale content as it is for new entries.

Previously, this was only done for new cache entries.
(see: http://mailman.nginx.org/pipermail/nginx/2016-January/049734.html)

This is useful when serving stale content is not permissable but sending
many requests upstream is undesriable.


This patch exposes the ngx_http_file_cache_lock function; this function
is then called in ngx_http_upstream if a cache entry has expired.

I have attached two versions of this patch, a "minimal" one that avoids
changes where not strictly necessary, and a "cleaner" version which is
more invasive but (in my opinion) cleaner.

Both patches cause no (additional) failures in the nginx test suite.
I tested with as many modules as I could reasonably enable.

Additionally, a colleague will add tests for this new behaviour in a
follow-up patch.


Regards, Elliot.



-----------------------------
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-----------------------------
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Apply cache locking behaviour to stale cache entries. Attachments

Elliot Thomas 666 December 03, 2018 07:12AM

Re: [PATCH] Apply cache locking behaviour to stale cache entries.

Maxim Dounin 282 December 10, 2018 02:08PM

Re: [PATCH] Apply cache locking behaviour to stale cache entries. Attachments

Elliot Thomas 259 December 14, 2018 05:56AM

Re: [PATCH] Apply cache locking behaviour to stale cache entries.

Elliot Thomas 211 January 16, 2019 05:22AM

Re: [PATCH] Apply cache locking behaviour to stale cache entries.

Maxim Dounin 230 January 17, 2019 08:26AM

Re: [PATCH] Apply cache locking behaviour to stale cache entries.

Thomas Peterson 185 March 15, 2019 06:24AM

Re: [PATCH] Apply cache locking behaviour to stale cache entries.

Maxim Dounin 209 March 18, 2019 10:24AM

Re: [PATCH] Apply cache locking behaviour to stale cache entries. Attachments

Elliot Thomas 227 June 11, 2019 06:30AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready