Hello, Anto:<div><br></div><div>That the way we use to solve what you encountered:</div><div>Compile nginx with &#39;cache_purge&#39; module (module: <a href="http://labs.frickle.com/nginx_ngx_cache_purge/"><font class="Apple-style-span" color="#000000">http://labs.frickle.com/nginx_ngx_cache_purge/</font></a>)</div>
<div>Use &#39;proxy_cache&#39; to store the generated static file instead of &#39;proxy_store&#39;, and when the file changed, the application server(CMS, I think in your app) will purge that file actively.&nbsp;</div><div>Part of the configure file:</div>
<div><font class="Apple-style-span" color="#666666"><br></font></div><div><font class="Apple-style-span" color="#666666">proxy_cache_path &nbsp;/cache/proxy_cache_dir levels=2:2 keys_zone=cache_one:500m inactive=3d max_size=100g;</font></div>
<div><div><font class="Apple-style-span" color="#666666">&nbsp;location ~ /purge(/.*)</font></div><div><font class="Apple-style-span" color="#666666">&nbsp;&nbsp;{</font></div><div><font class="Apple-style-span" color="#666666">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allow &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;127.0.0.1;</font></div>
<div><font class="Apple-style-span" color="#666666">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allow &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://192.168.1.0/24">192.168.1.0/24</a>;</font></div><div><font class="Apple-style-span" color="#666666">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;deny &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all;</font></div>
<div><font class="Apple-style-span" color="#666666">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_cache_purge &nbsp; &nbsp;cache_one &nbsp; $1;</font></div><div><font class="Apple-style-span" color="#666666">&nbsp;}</font></div></div><div><br></div><div>Hope it helps.</div>
<div><br><div class="gmail_quote">On Fri, Jan 7, 2011 at 1:48 AM, Anto <span dir="ltr">&lt;<a href="mailto:aryanto@chello.at">aryanto@chello.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div bgcolor="#ffffff" text="#000000">
<small><font face="Courier New, Courier, monospace">Hello everybody,<br>
<br>
I am looking for suggestions to accomplish what I would like to achieve.
<br>
<br>
Suppose we have a PHP based CMS which could generate a static file copy
of a HTML page, every time nginx access it via fastcgi. I think the
basic configuration on nginx would be like below:<br>
<br>
try_files $uri @cms;<br>
<br>
location @cms {<br>
&nbsp;&nbsp; fastcgi_pass unix:/tmp/fastcgi.socket;<br>
}<br>
<br>
The problem would be that nginx will always serve the static file until
it gets purged. So that if the CMS updated the HTML page, the client
will never get that new version. Is there any way to do that purging or
update mechanism in nginx? Or should that be done by the CMS or
external cron like program?<br>
<br>
Would it not be the same situation if we would use fastcgi_store
directive?<br>
<br>
Thanks in advance for your response.<br>
<br>
Kind regards,<br>
<br>
Anto<br>
</font></small><br>
</div>

<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">自由是我生命之基石,尊重是我行为之准绳</font></font><div><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">也许我以千百种方式生活在这世上,但我坚守我人生之信仰</font></font></div>
<div><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">所以,我的朋友</font></font></div><div><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">请平视的看着我,</font></font><span style="color:rgb(51, 51, 51)"><font face="&#39;comic sans ms&#39;, sans-serif">带着你的微笑</font></span></div>
<div><font color="#333333"><br></font></div><br>
</div>