Forum: NGINX How to delete cache based on expires headers?

2608d3cce53c362940168888952307fb?d=identicon&s=25 Indo Php (Guest)
on 2013-12-19 05:21
(Received via mailing list)
Hi

I'm using proxy_cache to mirror my files with the configuration below

proxy_cache_path /var/cache/nginx/image levels=1:2 keys_zone=one:10m
inactive=7d   max_size=100g;

Our backend server has the expires header set to 600secs

Is that posibble for us to also delete the cache files located
at/var/cache/nginx/image depends on the backend expire header?
2608d3cce53c362940168888952307fb?d=identicon&s=25 Indo Php (Guest)
on 2013-12-24 03:58
(Received via mailing list)
Hello..

Can somebody help me on this?

Thank you before



On Thursday, December 19, 2013 11:21 AM, Indo Php <iptablez@yahoo.com>
wrote:

Hi

I'm using proxy_cache to mirror my files with the configuration below

proxy_cache_path /var/cache/nginx/image levels=1:2 keys_zone=one:10m
inactive=7d   max_size=100g;

Our backend server has the expires header set to 600secs

Is that posibble for us to also delete the cache files located
at/var/cache/nginx/image depends on the backend expire header?
2adf10d4d02d9e5d7a2e0eef01ea8145?d=identicon&s=25 magic.drums@gmail.com (Guest)
on 2013-12-24 16:20
(Received via mailing list)
Using change de name the file or change size file.

Regards,
526b09f2b949aae346eda86df5827b1f?d=identicon&s=25 "António P. P. Almeida" <appa@perusio.net> (Guest)
on 2013-12-24 16:28
(Received via mailing list)
Why you want to do this? nginx can manage expiration/cache-control
headers
all by itself.

As soon as the defined max-age is set it returns a upstream status of
EXPIRED until it fetches a fresh
page from upstream.

Deleting won't buy you anything in terms of content freshness.





----appa
2608d3cce53c362940168888952307fb?d=identicon&s=25 Indo Php (Guest)
on 2013-12-30 05:28
(Received via mailing list)
Hi

Is that means that nginx will put the files based on the upstream expire
headers? After that nginx will delete the cache files?





On Tuesday, December 24, 2013 10:28 PM, Antnio P. P. Almeida
<appa@perusio.net> wrote:

Why you want to do this? nginx can manage expiration/cache-control
headers all by itself.

As soon as the defined max-age is set it returns a upstream status of
EXPIRED until it fetches a fresh
page from upstream.

Deleting won't buy you anything in terms of content freshness.






----appa




On Tue, Dec 24, 2013 at 3:57 AM, Indo Php <iptablez@yahoo.com> wrote:

Hello..
526b09f2b949aae346eda86df5827b1f?d=identicon&s=25 "António P. P. Almeida" <appa@perusio.net> (Guest)
on 2014-01-02 20:19
(Received via mailing list)
Yes.

Nginx will obey the Cache-Control/Expire headers. It won't delete, but
it
will refresh the files so that the served content is fresh.
So it is as if the files were deleted. AFAIK deletion happens more often
when the file is not accessed for given time specified through the
inactive
parameter of the proxy_cache_path/fastcgi_cache_path directives.

----appa
2608d3cce53c362940168888952307fb?d=identicon&s=25 Indo Php (Guest)
on 2014-01-06 05:18
(Received via mailing list)
Thanks that makes clear!



On Friday, January 3, 2014 2:19 AM, Antnio P. P. Almeida
<appa@perusio.net> wrote:

Yes.

Nginx will obey the Cache-Control/Expire headers. It won't delete, but
it will refresh the files so that the served content is fresh.
So it is as if the files were deleted. AFAIK deletion happens more often
when the file is not accessed for given time specified through the
inactive
parameter of the proxy_cache_path/fastcgi_cache_path directives.


----appa




On Mon, Dec 30, 2013 at 5:27 AM, Indo Php <iptablez@yahoo.com> wrote:

Hi
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.