Welcome! Log In Create A New Profile

Advanced

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

June 16, 2010 09:21PM
Thank you for your reply.

I mean everything is ok before I limited .jpg and .gif to be cached.
So I didn't write all configurations here.
Then, I give the full version before and current for you to help me.

# Version Ok
# I visited http://www.test.com/1.gif,
# and purge it by visiting, http://www.test.com/purge/1.gif
# It's ok, show: Successful purge ...
##########################################################
server {
server_name www.test.com;
listen 80;

location / {
proxy_cache cache1;
proxy_cache_valid 200 304 15m;
proxy_cache_key $host$uri$is_args$args;
proxy_pass http://backend;
}

location ~ .*\.(php)?$
{
proxy_pass http://backend;
}

location ~ /purge(/.*)
{
proxy_cache_purge cache1 $host$1$is_args$args;
}
}

# Version not ok
# This can't be purged, show: 404
# and I'm sure I visited http://www.test.com/1.gif again before I purge.
# It's in cache indeed, because I can see the picture in my browser (with F5, and Ctrl+F5) even after I delete 1.gif from that server.
########################################################
server {
server_name www.test.com;
listen 80;

access_log logs/proxy.log;

location ~ .*\.(jpg|gif)$ { # I want only jpg/gif to be cached
proxy_cache cache1;
proxy_cache_valid 200 304 15m;
proxy_cache_key $host$uri$is_args$args;
proxy_pass http://backend;
}

location / # All others not cached
{
proxy_pass http://backend;
}

location ~ /purge(/.*)
{
proxy_cache_purge cache1 $host$1$is_args$args;
}
}

Thank you, I thought you can repeat this problem easily.
Subject Author Posted

FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora January 10, 2010 05:40PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora June 07, 2010 11:24PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

piggy June 16, 2010 09:28AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

piggy June 16, 2010 09:38AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora June 16, 2010 11:34AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

piggy June 16, 2010 09:21PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora June 16, 2010 09:42PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

piggy June 16, 2010 09:59PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora August 11, 2010 06:04PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora May 03, 2011 12:18PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 12, 2010 05:44AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora October 12, 2010 09:02AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 12, 2010 09:29AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora October 12, 2010 10:14AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 12, 2010 10:46AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 12, 2010 12:13PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora October 12, 2010 12:10PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora October 12, 2010 09:28PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 13, 2010 06:02AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 13, 2010 06:50AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

digginchina October 13, 2010 07:06AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Splitice October 13, 2010 11:56PM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora October 14, 2010 08:14AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

ahu October 06, 2011 10:11AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

ahu October 07, 2011 01:28AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

splitice October 06, 2011 10:40AM

Re: FRiCKLE Labs & yo.se pres. ngx_cache_purge

Piotr Sikora October 07, 2011 12:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 105
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready