Anonymous User
September 10, 2009 12:44PM
Hello,

Maxim Dounin wrote:
> Directive proxy_cache_valid specifies how long response will be
> considered valid (and will be returned without any requests to
> backend). After this time response will be considered "stale" and
> either won't be returned or will be depending on
> proxy_cache_use_stale setting.

So when I use "proxy_cache_use_stale off;" which is default, nginx will
request the file again from the backend, if the time in
"proxy_cache_valid" is over?

> Argument "inactive" of proxy_cache_path specifies how long
> response will be stored in cache after last use. Note that even
> stale responses will be considered recently used if there are
> requests to them.

I am not quite sure whether I understand it correctly or not. I simply
want nginx to cache responses with 200 status for 2 hours. After this
time the response gets deleted from cache, so when new clients want the
file, nginx requests it again from backend.
In other words: The requests should be stored in cache for 2 hours after
the last request from backend, not for 2 hours after the last request
from a client.
Could you give me a hint on how to achieve this behavior?

>> For some reason my cache still contains a file, that has been deleted on
>> my backend 10 hours ago. Both, proxy_cache_valid and inactive= are set
>> to 2h. Maybe the two settings have different meanings and I do not
>> understand yet.
>
> Which version? From the description it looks like a bug fixed in
> 0.8.14:
>
> *) Bugfix: an expired cached response might stick in the "UPDATING"
> state.
>
> If you see this in 0.8.14 - please provide more details.

I am using the stable version (0.7.61). Do I have to update to 0.8.14 in
order to get this working? I'm not sure whether it's my config or a bug.
Hm.. and I can't figure out the meaning of the "updating" state. All the
other states are clear to me.

Thanks for your help!
Subject Author Posted

question about proxy_cache_valid

Anonymous User September 10, 2009 11:08AM

Re: question about proxy_cache_valid

Maxim Dounin September 10, 2009 11:48AM

Re: question about proxy_cache_valid

Anonymous User September 10, 2009 12:44PM

Re: question about proxy_cache_valid

Maxim Dounin September 10, 2009 02:00PM

Re: question about proxy_cache_valid

Anonymous User September 11, 2009 09:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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