Welcome! Log In Create A New Profile

Advanced

proxy_nocache

Igor Sysoev
November 30, 2009 03:24PM
Я планирую сделать

location / {
proxy_cache ...

proxy_nocache $some;
proxy_nocache $cookie_some;
}

Эти директивы запрещают кэширование, если указанные переменные
не равны "" или "0".

Кроме того, я хочу сделать директиву proxy_cache_reload:

geo $valid {
default "";
192.168.1.1 1;
...
}

proxy_cache_reload $valid;

Эта директива позволяет:

1) принудительно обновить кэш, если в запросе есть заголовок
"Cache-Control: no-cache" или "max-age=0". Это совместимо с операцией
reload в браузерах. Во время обновления другие клиенты получают
необновлённые данные.

2) удалить объект из кэша без обновления, если в заросе есть нестандартный
заголовок "Cache-Control: purge". Это можно делать из скриптов.


Для FastCGI - аналоги с именами fastcgi_nocache и fastcgi_cache_reload.


--
Игорь Сысоев
http://sysoev.ru

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

proxy_nocache

Igor Sysoev November 30, 2009 03:24PM

Re: proxy_nocache

Никита Кардашин November 30, 2009 03:56PM

Re: proxy_nocache

Peter Leonov November 30, 2009 04:54PM

Re: proxy_nocache

Sergey Shepelev November 30, 2009 06:50PM

Re: proxy_nocache

Никита Кардашин November 30, 2009 11:26PM

Re: proxy_nocache

Igor Sysoev December 01, 2009 03:14AM

Re: proxy_nocache

Михаил Монашёв December 01, 2009 03:54AM

Re: proxy_nocache

Igor Sysoev December 01, 2009 04:02AM

Re: proxy_nocache

dado December 05, 2009 03:02AM

Re: proxy_nocache

Boris Dolgov December 05, 2009 03:36AM

Re[2]: proxy_nocache

Михаил Монашёв December 05, 2009 10:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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