<font color="#000099"><div>Invalidate a cache page using the bypass mechanism proxy_cache_bypass, not expiration </div><div><br></div><div>To put it simply, Invalidate cache for  a particular key entry but not all of the cache</div>

<div><br></div><div>e.g for               </div><div><br></div><div>location = /vehicles {</div><div><br></div><div>proxy_cache_key         $request_uri;</div><div><br></div><div>}</div><div><br></div><div>Hashtable for cache:</div>

<div><br></div><div>[</div><div><br></div><div><a href="http://jj.com/vehicles/cars">http://jj.com/vehicles/cars</a> => cached page for cars</div><div><br></div><div><a href="http://jj.com/vehicles/bus">http://jj.com/vehicles/bus</a> => cached page for bus</div>

<div><br></div><div><a href="http://jj.com/vehicles/bike=">http://jj.com/vehicles/bike=</a>> cached page for bike</div><div>+ 10,000 key, values </div><div>]</div><div><br></div><div>I should be able to invalidate just "cars" because my page for cars have changed but not others. Say a person added a comment in the cars page. </div>

<div>Another analogy is to invalidate cache for a single blog post when all the blog posts have been cached under a single location directive. </div><div>-Quintin</div></font><br><div class="gmail_quote">On Wed, Feb 8, 2012 at 9:45 PM, António P. P. Almeida <span dir="ltr"><<a href="mailto:appa@perusio.net">appa@perusio.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 8 Fev 2012 15h59 WET, <a href="mailto:quintinpar@gmail.com">quintinpar@gmail.com</a> wrote:<br>
<br>
> Can someone help? My small site on a tiny VM is being bombarded and<br>
> the cache invalidation is clearing up everything. Which means<br>
> warming up the caching takes a lot of expensive queries.<br>
<br>
</div>What cache invalidation? What caching strategy are you using?<br>
Are working with a content based expiration logic or from a<br>
microcaching perspective?<br>
<br>
You can inspect the cache using a small shell script:<br>
<br>
<a href="https://github.com/perusio/nginx-cache-inspector" target="_blank">https://github.com/perusio/nginx-cache-inspector</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--- appa<br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br>