<div dir="ltr">Hello,<div><br></div><div>I think this is only supported in the commercial edition of nginx. You are using the ngx_cache_purge module see <a href="https://github.com/FRiCKLE/ngx_cache_purge/blob/master/TODO.md">here</a>, which doesn't support wildcard urls.</div>
<div><br></div><div>---</div><div>Kurt Cancemi</div><div><a href="http://www.getwnmp.org">http://www.getwnmp.org</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 31, 2014 at 12:40 PM, Ventzy <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have cache setup like this:<br>
<br>
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pagecache:10m;<br>
location / {<br>
...<br>
proxy_cache pagecache;<br>
proxy_cache_key "$scheme://$host$request_uri";<br>
}<br>
<br>
And it works as expected.<br>
<br>
I want cache purging and it works for single url, but not for wildcard url.<br>
I am looking this doc<br>
<a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_purge" target="_blank">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_purge</a>.<br>
<br>
For example I have page <a href="http://cms.local/gsm" target="_blank">http://cms.local/gsm</a> and if I do proxy_cache_purge<br>
pagecache "<a href="http://cms.local/gsm" target="_blank">http://cms.local/gsm</a>"; it is removed from cache, but<br>
proxy_cache_purge pagecache "<a href="http://cms.local/*" target="_blank">http://cms.local/*</a>"; doesn't have any effect.<br>
My config with purge looks like this:<br>
<br>
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pagecache:10m;<br>
location / {<br>
error_page 477 = @purge;<br>
if ($request_method = PURGE) {<br>
return 477;<br>
}<br>
proxy_cache pagecache;<br>
proxy_cache_key "$scheme://$host$request_uri";<br>
}<br>
<br>
location @purge {<br>
access_log /var/log/nginx/caching.purge.log;<br>
<br>
proxy_cache_purge pagecache "<a href="http://cms.local/*" target="_blank">http://cms.local/*</a>";<br>
#proxy_cache_purge pagecache "$scheme://$host$request_uri";<br>
}<br>
<br>
Am I missing something?<br>
I am using nginx 1.6 on ubuntu 12.04.<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,250519,250519#msg-250519" target="_blank">http://forum.nginx.org/read.php?2,250519,250519#msg-250519</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>