<div dir="ltr">You can do that.<div><br></div><div>At the http level set a map directive like:</div><div><br></div><div>map $arg_act$arg_ID $no_cache {</div><div style> default 1;</div><div style> ~*detail[[:alnum:]]+ 0; # assuming the ID is alphanumeric</div>
<div style>}</div><div style><br></div><div style><br></div><div style>Then add:</div><div style><br></div><div style>fastcgi_cache_bypass $no_cache;</div><div style>fastcgi_no_cache $no_cache;</div><div style><br></div><div style>
to your FastCGI cache configuration.</div><div style><br></div><div style>As per the headers I don't quite understand what you want to do. Do you</div><div style>want the FastCGI cache to ignore the Cache-Control headers set by the </div>
<div style>application?</div><div style><br></div><div style><br></div><div style><br></div><div style><br></div><div><br></div><div><br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div>
----appa<br><br></div>
<br><br><div class="gmail_quote">On Sat, Apr 6, 2013 at 5:34 PM, Typlo <span dir="ltr"><<a href="mailto:typlo@me.com" target="_blank">typlo@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">Hello,</div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">I would like to use the FastCGI cache feature of nginx for my web application. But I need to use it only for a set of URL.</div>
<div style="font-family:Helvetica,Arial,Verdana,sans-serif"><br></div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">I would like to use it for the following locations:</div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">
<br></div><div style="font-family:Helvetica,Arial,Verdana,sans-serif"><strong><a href="http://domain.com/index.php?act=detail&ID=[ANY" target="_blank">http://domain.com/index.php?act=detail&ID=[ANY</a> ID HERE]</strong></div>
<div style="font-family:Helvetica,Arial,Verdana,sans-serif"><br></div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">Example:</div><div style="font-family:Helvetica,Arial,Verdana,sans-serif"><a href="http://domain.com/index.php?act=detail&id=o2Zimg" target="_blank">http://domain.com/index.php?act=detail&id=o2Zimg</a></div>
<div style="font-family:Helvetica,Arial,Verdana,sans-serif"><br></div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">And so on.</div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">What should I place in the location directive to cache only those URLs?</div>
<div style="font-family:Helvetica,Arial,Verdana,sans-serif">I can't figure it out on the nginx wiki.</div><div style="font-family:Helvetica,Arial,Verdana,sans-serif"><br></div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">
Also, I would like to replace the Cache Control and Pragma headers set by my PHP application, can I use add_headers directive? Or I would have to add a 3rd party module, like more_http_headers? I use nginx from PPA(Ubuntu), so for adding more_http_headers I would have to build it :/</div>
<div style="font-family:Helvetica,Arial,Verdana,sans-serif"><br></div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">Greetings from Antarctica.</div><div style="font-family:Helvetica,Arial,Verdana,sans-serif">
Thanks.</div></div></div><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>