Welcome! Log In Create A New Profile


fastcgi_no_cache and map with default value

February 03, 2023 11:30AM
I'm configuring FastCGI caching and adding some maps to skip cache. Specifically for WP bu it doesn't matter.

I have similar config (adding only related parts there):

As long, as I have "default" there - it always skipping cache, if only few maps' requirements are being met, not all of them.
And that's logical - as other map will rewrite $skip_cache variable and it'll be 0 then, which leads to page be cached.

But when I'm deleting "default" everywhere - it works. And that's strange, as per doc:
"If at least one value of the string parameters is not empty and is not equal to “0” then the response will not be saved"

"default value -
sets the resulting value if the source value matches none of the specified variants. When default is not specified, the default resulting value will be an empty string."

So, when I'm not specifying default value, it should set $skip_cache to an empty string. And in this case cache should be saved, but it's being bypassed anyway (like when map works). Is it bug? Or it's designed that way and I'm missing something in the doc?
Subject Author Posted

fastcgi_no_cache and map with default value

KitPavloNaMopedi February 03, 2023 11:30AM

Re: fastcgi_no_cache and map with default value

KitPavloNaMopedi February 06, 2023 08:42AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 256
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