atom feed26 messages in ru.sysoev.nginxRe: Skipping the proxy cache based on...
FromSent OnAttachments
ehudros2Dec 29, 2010 6:14 am 
ehudros2Dec 30, 2010 5:26 am 
ehudros2Jan 2, 2011 4:28 am 
DayoJan 18, 2011 1:33 pm 
António P. P. AlmeidaJan 18, 2011 1:51 pm 
DayoJan 18, 2011 2:17 pm 
DayoJan 19, 2011 10:44 am 
DayoJan 19, 2011 10:45 am 
DayoJan 19, 2011 11:05 am 
DayoJan 19, 2011 11:06 am 
DayoJan 19, 2011 11:57 am 
António P. P. AlmeidaJan 19, 2011 12:10 pm 
DayoJan 19, 2011 12:42 pm 
António P. P. AlmeidaJan 19, 2011 1:01 pm 
DayoJan 19, 2011 1:22 pm 
EugaiaJan 19, 2011 1:26 pm 
António P. P. AlmeidaJan 19, 2011 1:27 pm 
DayoJan 19, 2011 1:48 pm 
DayoJan 19, 2011 2:19 pm 
António P. P. AlmeidaJan 19, 2011 5:20 pm 
agentzhJan 19, 2011 8:05 pm 
DayoJan 20, 2011 12:08 pm 
António P. P. AlmeidaJan 20, 2011 12:29 pm 
DayoJan 21, 2011 12:50 pm 
DayoJan 21, 2011 12:51 pm 
DayoJan 21, 2011 1:17 pm 
Subject:Re: Skipping the proxy cache based on a cookie?
From:Dayo (ngin@nginx.us)
Date:Jan 19, 2011 11:57:58 am
List:ru.sysoev.nginx

I think I am getting closer and hope someone can nudge me across the line.

My set up is now ...

[code] if ($http_cookie !~* "mycookie=0") { add_header Cookie: "mycookie=1"; } [/code]

The idea being that if mycookie is not 0 (which should cover it not being set), it is set to 1. I then added cookie_MYCOOKIE to the bypass and no cache parameters so that if it is set to 1, they are triggered.

The backend sets mycookie to 0 if it is 1 so that on subsequent requests, the resource is served from the cache.

However unfortunately, the "add_header Cookie: "mycookie=1";" line does not seem to be called at all.

Thanks

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,161969,167669#msg-167669