Welcome! Log In Create A New Profile

Advanced

Re: set $no cache 0 не работает.

Илья Шипицин
August 03, 2022 10:30AM
map-ом надо переменную выставлять. В случае нескольких условий - несколько
map-ов друг через друга

On Wed, Aug 3, 2022, 7:24 PM milov <nginx-forum@forum.nginx.org> wrote:

> Есть код
>
> set $no_cache 0;
>
> if ($request_method = POST){set $no_cache 1;}
> if ($http_host ~* success.html$){set $no_cache 1;}
> if ($remote_addr ~* ^(192.168.0*)$){set $no_cache 1;}
>
> # Не берется из кеша
> fastcgi_cache_bypass $no_cache;
>
> # Не сохраняется в кеш
> fastcgi_no_cache $no_cache;
>
> Ни один if не срабатывает, т.е. сохраняет в кеш и берёт из кеша. Куда
> смотреть, копать?
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?21,294905,294905#msg-294905
>
> _______________________________________________
> nginx-ru mailing list -- nginx-ru@nginx.org
> To unsubscribe send an email to nginx-ru-leave@nginx.org
>
_______________________________________________
nginx-ru mailing list -- nginx-ru@nginx.org
To unsubscribe send an email to nginx-ru-leave@nginx.org
Subject Author Posted

Re: set $no cache 0 не работает.

Илья Шипицин August 03, 2022 10:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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