Forum: NGINX Wildcard proxy_cache_purge doesn't work

2974d09ac2541e892966b762aad84943?d=identicon&s=25 Ventzy (Guest)
on 2014-05-31 18:41
(Received via mailing list)
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_modul....

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
2fd0c3f17efded066208e74d8e7f307e?d=identicon&s=25 Kurt Cancemi (Guest)
on 2014-05-31 23:34
(Received via mailing list)
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/ma..., which
doesn't support wildcard urls.

---
Kurt Cancemi
http://www.getwnmp.org
2974d09ac2541e892966b762aad84943?d=identicon&s=25 Ventzy (Guest)
on 2014-06-02 11:59
(Received via mailing list)
I see. Thank you.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250519,250558#msg-250558
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.