Welcome! Log In Create A New Profile

Advanced

Re: [NGINX] condition proxy_cache

merlin corey
February 12, 2010 07:42PM
2010/2/11 Jérôme Loyet <jerome@loyet.net>:
> Hi,
>
> is there a way to disable proxy_cache on specific get parameters or
> http headers ?
>
> for example, this doesn't work:
>
> if ($args ~* nocache=) {
>  proxy_cache off;
> }
>
>
> Thx
> ++ jerome
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

Of course it doesn't work, the setting is only inside the sublocation
created by if, and so after that, it's back on.

This is just my simplified and limited understanding of things...
Basically, if doesn't work the way people think it does in NginX. Some
more can be found at http://wiki.nginx.org/IfIsEvil .

A possible "workaround" might be to proxy to different back-end
nginx's based on the arguments, one with caching enabled, one with
caching disabled.

-- Merlin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

[NGINX] condition proxy_cache

Jérôme Loyet February 11, 2010 08:52AM

Re: [NGINX] condition proxy_cache

merlin corey February 12, 2010 07:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready