nginx-0.7.53

Jérôme Loyet jerome at loyet.net
Wed Apr 29 04:03:06 MSD 2009


Le 28 avril 2009 23:09, Jérôme Loyet <jerome at loyet.net> a écrit :
> Hi Igor,
>
> since 0.7.48 and the fact that headers like Expires or Cache-Control
> are take into account ... I'm not able to cache everything. If the
> backend set a Expires header in the past, then the page is never
> cached. Is there a way to make it work like this ?
>
> Thanks
> ++ jerome
>
Hi igor,

I made a patch which add two new directives:
proxy_cache_ignore_headers and fastcgi_cache_ignore_headers. By
default, they are set to off and everything works as before. When set
to on, pages are cached even if Expires or Cache-Control said not to.

I need to cache pages even if the backend said not to because I don't
have access to the backend code and no one can :(

The patch is attached. I've tested it with proxy but not with fastcgi.
As the patch is simple, it should not be a problem.

Hope it would help.

++ Jerome


> 2009/4/28 Igor Sysoev <is at rambler-co.ru>:
>> On Tue, Apr 28, 2009 at 08:32:16AM -0700, Michael Shadle wrote:
>>
>>> 2009/4/28 Igor Sysoev <is at rambler-co.ru>:
>>> > On Tue, Apr 28, 2009 at 08:16:01AM -0700, Michael Shadle wrote:
>>> >
>>> >> On Tue, Apr 28, 2009 at 1:23 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
>>> >>
>>> >> > If you want to minimize downtime - you should follow binary
>>> >> > upgrade procedure as described here:
>>> >> >
>>> >> > http://wiki.nginx.org/NginxCommandLine
>>> >> >
>>> >> > This gives you zero downtime (i.e. no single client request
>>> >> > missed).
>>> >>
>>> >> interesting.
>>> >>
>>> >> so find the master pid
>>> >>
>>> >> kill -USR2 $pid
>>> >> kill -WINCH $pid
>>> >>
>>> >> Is all that is needed?
>>> >
>>> > kill -WINCH $pid
>>> >
>>> > decide keep the new binary or not, then
>>> >
>>> > kill -QUIT $pid.oldbin
>>> >
>>> > to keep, or
>>> >
>>> > kill -TERM $pid
>>> >
>>> > to rollback.
>>>
>>> the wiki is out of date then. it says USR2 then WINCH. not WINCH then QUIT.
>>>
>>> So there is no USR2 required? I will update the wiki with these
>>> instructions (is there a version this started in?)
>>
>> No, USR2 is required. WINCH is not necessary step.
>> You may use USR2, sleep 1, -f pid.oldbin, QUIT.
>> Look inside Makefile
>>
>>
>> --
>> Igor Sysoev
>> http://sysoev.ru/en/
>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.0.7.53.1.cache_ignore_headers
Type: application/octet-stream
Size: 2973 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20090429/fbbc6623/attachment.obj>


More information about the nginx mailing list