Welcome! Log In Create A New Profile

Advanced

Re: using $upstream* variables inside map directive

Francis Daly
November 12, 2020 03:36AM
On Thu, Nov 12, 2020 at 02:33:49AM -0500, unoobee wrote:

Hi there,

> I tried using $upstream_http_content_length inside the map directive with
> the "volatile" parameter to specify the proxy_cache behavior, but the map
> still uses the default value.

What's your config?

> Is there any way to set the proxy_cache behavior depending on
> $upstream_http_content_length via the map directive?

What proxy_cache behavior do you want to set?

You could reasonably set proxy_no_cache, because that only applies after
accessing upstream.

You can't usefully set proxy_cache, or proxy_cache_bypass, or
proxy_cache_key, because they are all consulted before the decision on
whether or not to access upstream has been made.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

using $upstream* variables inside map directive

Kirill K. May 07, 2014 01:38AM

Re: using $upstream* variables inside map directive

Jonathan Matthews May 07, 2014 06:32AM

Re: using $upstream* variables inside map directive

Kirill K. May 07, 2014 07:44AM

Re: using $upstream* variables inside map directive

Ruslan Ermilov May 07, 2014 08:46AM

Re: using $upstream* variables inside map directive

Kirill K. May 07, 2014 08:53AM

Re: using $upstream* variables inside map directive

Ruslan Ermilov May 07, 2014 10:40AM

Re: using $upstream* variables inside map directive

Kirill K. May 07, 2014 03:44PM

Re: using $upstream* variables inside map directive

unoobee November 11, 2020 12:55PM

Re: using $upstream* variables inside map directive

ru@nginx.com November 11, 2020 02:14PM

Re: using $upstream* variables inside map directive

unoobee November 12, 2020 02:33AM

Re: using $upstream* variables inside map directive

Francis Daly November 12, 2020 03:36AM

Re: using $upstream* variables inside map directive

unoobee November 12, 2020 04:58AM

Re: using $upstream* variables inside map directive

Francis Daly November 12, 2020 09:36AM

Re: using $upstream* variables inside map directive

unoobee November 12, 2020 11:00AM

Re: using $upstream* variables inside map directive

Francis Daly November 12, 2020 11:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready