selective caching
Jérôme Loyet
jerome at loyet.net
Sat Jul 25 02:46:46 MSD 2009
2009/7/24 Maxim Dounin <mdounin at mdounin.ru>:
> Hello!
>
> On Fri, Jul 24, 2009 at 12:29:16PM -0400, vburshteyn wrote:
>
>> so i am using cache to great effect to cache and speed the site.
>>
>> I am just curious is there a way to do selective caching? it is imperitive that i keep one stupid URL from caching. Is that possible?
yes use proxy_cache none;
>
> Just configure different locations for urls you want to be cached
> and urls you don't want to. E.g.
>
> location / {
> proxy_pass http://...
>
> # cache everything here
> proxy_cache blah;
> ...
> }
>
> location /do-not-cache-here {
> proxy_pass http://...
proxy_cache none;
> }
>
> See http://wiki.nginx.org/NginxHttpCoreModule#location for details
> about locations.
>
> Maxim Dounin
>
>
More information about the nginx
mailing list