Welcome! Log In Create A New Profile

Advanced

Re: Wildcard proxy_cache_purge doesn't work

May 31, 2014 05:36PM
Hello,

I think this is only supported in the commercial edition of nginx. You are
using the ngx_cache_purge module see here
https://github.com/FRiCKLE/ngx_cache_purge/blob/master/TODO.md, which
doesn't support wildcard urls.

---
Kurt Cancemi
http://www.getwnmp.org


On Sat, May 31, 2014 at 12:40 PM, Ventzy <nginx-forum@nginx.us> wrote:

> I have cache setup like this:
>
> proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pagecache:10m;
> location / {
> ...
> proxy_cache pagecache;
> proxy_cache_key "$scheme://$host$request_uri";
> }
>
> And it works as expected.
>
> I want cache purging and it works for single url, but not for wildcard url.
> I am looking this doc
> http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_purge
> .
>
> For example I have page http://cms.local/gsm and if I do proxy_cache_purge
> pagecache "http://cms.local/gsm"; it is removed from cache, but
> proxy_cache_purge pagecache "http://cms.local/*"; doesn't have any effect.
> My config with purge looks like this:
>
> proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pagecache:10m;
> location / {
> error_page 477 = @purge;
> if ($request_method = PURGE) {
> return 477;
> }
> proxy_cache pagecache;
> proxy_cache_key "$scheme://$host$request_uri";
> }
>
> location @purge {
> access_log /var/log/nginx/caching.purge.log;
>
> proxy_cache_purge pagecache "http://cms.local/*";
> #proxy_cache_purge pagecache "$scheme://$host$request_uri";
> }
>
> Am I missing something?
> I am using nginx 1.6 on ubuntu 12.04.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,250519,250519#msg-250519
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Wildcard proxy_cache_purge doesn't work

Ventzy May 31, 2014 12:40PM

Re: Wildcard proxy_cache_purge doesn't work

x64architecture May 31, 2014 05:36PM

Re: Wildcard proxy_cache_purge doesn't work

Ventzy June 02, 2014 05:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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