June 17, 2010 02:38PM
On Thu, Jun 17, 2010 at 06:24:44PM +0000, Ole Laursen wrote:

> I'd like to force a refresh of a cache entry - is there any built-in way of
> doing that? So the incoming request retrieves a new response from the back-end
> and inserts it in the cache even if the previous entry was still valid?
>
> I have some pages that take > 1 s to generate. I'm caching those with
> proxy_cache with a timeout of a few minutes. Works fine, but unfortunately the
> first client that gets in after a slow period will have to wait. I'd like to be
> able to refresh some URLs periodically with a script, keeping the cache warm, so
> it's always snappy.

You may bypass cache using "Some-Secret-Header: 1" in a request and setting:
proxy_no_cache $http_some_secret_header;
The response may be cached.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Force cache refresh

Ole Laursen June 17, 2010 02:30PM

Re: Force cache refresh

Igor Sysoev June 17, 2010 02:38PM

Re: Force cache refresh

Ole Laursen June 18, 2010 06:36AM

Re: Force cache refresh

Ole Laursen June 18, 2010 09:26AM

Re: Force cache refresh

Igor Sysoev June 18, 2010 10:26AM

Re: Force cache refresh

Ole Laursen June 19, 2010 01:32PM

Re: Force cache refresh

Ole Laursen June 21, 2010 06:52AM

Re: Force cache refresh

mschipperheyn January 18, 2011 07:49PM

Re: Force cache refresh

Simon Liu January 19, 2011 03:22AM

Re: Force cache refresh

Scott Smith June 17, 2010 03:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
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