| Nginx-ru mailing list archive (nginx-ru@sysoev.ru) [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re[2]: Не кешировать определ	енную страницу
 
 Сапсибо Игорь, помогло.
А если у меня есть еще переменная, которую я не хочу кешировать 
$arg_order_custinfo - как сделать чтобы он обе учитывал? Два map нельзя, 
учитывает последний.
Fri, 25 Mar 2011 13:15:17 +0300 письмо от Igor Sysoev <igor@xxxxxxxxx>:
> On Fri, Mar 25, 2011 at 01:41:54AM +0300, Александр Рочев wrote:
> > Доброй ночи всем. 
> > Включил кеширование с помощью nginx.
> > 
> > Мне необходимо не кешировать админку и корзину.
> > 
> > Написал:
> > location ~ (admin.php|index.php?shopping_cart=yes) {
> > proxy_pass   (http://127.0.0.1:2002;)   (http://127.0.0.1:2002;) 
> http://127.0.0.1:2002; (http://127.0.0.1:2002;) 
> > proxy_redirect off;
> > proxy_set_header Host $http_host;
> > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> > proxy_set_header X-Real-IP $remote_addr;
> > }
> > 
> > Админка не кешируется, а корзина попадает в кеш. Подскажите как сделать так,
> чтобы страница index.php?shopping_cart=yes не кешировалась?
> > Спасибо.
> 
> map $arg_shopping_cart  $nocache {
> default             "";
> yes                 11;
> }
> 
> server {
> 
> proxy_redirect off;
> proxy_set_header Host $http_host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Real-IP $remote_addr;
> 
> location / {
> proxy_pass   http://127.0.0.1:2002;
> proxy_cache  ...
> }
> 
> location = /admin.php {
> proxy_pass   http://127.0.0.1:2002;
> }
> 
> location = /index.php {
> proxy_pass   http://127.0.0.1:2002;
> proxy_cache  ...
> proxy_cache_bypass   $nocache;
> proxy_nocache        $nocache;
> }
> 
> 
> -- 
> Игорь Сысоев
> http://sysoev.ru
> 
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@xxxxxxxxx
> http://nginx.org/mailman/listinfo/nginx-ru
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
 |