great! thanks<br><br><div class="gmail_quote">2009/8/12 Piotr Sikora <span dir="ltr">&lt;<a href="mailto:piotr.sikora@frickle.com">piotr.sikora@frickle.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
this patch adds ability to purge content from nginx&#39;s FastCGI and proxy caches.<br>
<br>
Idea, as well as funding, came from <a href="http://yo.se" target="_blank">yo.se</a>.<br>
<br>
Example configuration:<br>
---<br>
proxy_cache_path /tmp/cache keys_zone=tmpcache:10m;<br>
<br>
location / {<br>
 &nbsp; proxy_pass &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://127.0.0.1:8000" target="_blank">http://127.0.0.1:8000</a>;<br>
 &nbsp; proxy_cache &nbsp; &nbsp; &nbsp; &nbsp;tmpcache;<br>
 &nbsp; proxy_cache_key &nbsp; &nbsp;$uri;<br>
}<br>
<br>
location ~ /purge(/.*) {<br>
 &nbsp; allow &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;127.0.0.1;<br>
 &nbsp; deny &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; all;<br>
 &nbsp; proxy_cache_purge &nbsp;tmpcache &nbsp; $1;<br>
}<br>
---<br>
<br>
allows:<br>
- anyone to GET <a href="http://www.site.com/abc" target="_blank">http://www.site.com/abc</a> from backend<br>
(and store it in nginx&#39;s cache),<br>
- users from 127.0.0.1 to purge &quot;/abc&quot; from cache using GET <a href="http://www.site.com/purge/abc" target="_blank">http://www.site.com/purge/abc</a>.<br>
<br>
Patch against latest nginx (0.8.8):<br>
<a href="http://labs.frickle.com/nginx_cache_purge/" target="_blank">http://labs.frickle.com/nginx_cache_purge/</a><br>
<br>
Best regards,<br><font color="#888888">
Piotr Sikora &lt; <a href="mailto:piotr.sikora@frickle.com" target="_blank">piotr.sikora@frickle.com</a> &gt;<br>
<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br><br>焦胜强<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>升东网络科技发展(上海)有限公司 运维中心 存储组<br>Email: <a href="mailto:jiaosq@mail.51.com">jiaosq@mail.51.com</a><br>