Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-16 Thread Jonathan Matthews
On 16 December 2013 12:38, Paul Taylor wrote: > Hi Maxim, > > Ok, thanks for the clarification. > > So to confirm, we are looking for the value of the sent header from the > upstream, to identify whether the content should be served from the cache, > or the upstream. Does this therefore mean that

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-16 Thread Paul Taylor
Hi Maxim, Ok, thanks for the clarification. So to confirm, we are looking for the value of the sent header from the upstream, to identify whether the content should be served from the cache, or the upstream. Does this therefore mean that the code that we have below, will check for the X-No-Cac

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-16 Thread Maxim Dounin
Hello! On Mon, Dec 16, 2013 at 09:22:25AM +, Paul Taylor wrote: > Yup, again, you’re right! I’ve moved the config around, so that I’m testing > for any ‘true’ value in the proxy_no_cache & proxy_bypass_cache directives > (removing the existing set_by_lua block). > > However, it’s still not

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-16 Thread Paul Taylor
Yup, again, you’re right! I’ve moved the config around, so that I’m testing for any ‘true’ value in the proxy_no_cache & proxy_bypass_cache directives (removing the existing set_by_lua block). However, it’s still not behaving as I’d expect. In the following scenario (note comments): map $upstr

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-13 Thread Maxim Dounin
Hello! On Thu, Dec 12, 2013 at 11:36:21PM +, Paul Taylor wrote: > Hi Maxim, > Thanks for your response. You’re right! Using the map did work > (I thought I’d tried that, but must have been tired!). > So, now I have one other challenge, the value of $foo that you > define below is needed to

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-12 Thread Paul Taylor
Hi Maxim, Thanks for your response. You’re right! Using the map did work (I thought I’d tried that, but must have been tired!). So, now I have one other challenge, the value of $foo that you define below is needed to identify whether to cache the response of not. The only issue is that I have a

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-12 Thread Maxim Dounin
Hello! On Thu, Dec 12, 2013 at 07:19:56PM +, Paul Taylor wrote: > I’m in the process of making some amends to an environment, > where my upstream servers are sending a custom header > (X-No-Cache), which I need to detect and alter caching rules > within the configuration. > > The custom h

sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-12 Thread Paul Taylor
I’m in the process of making some amends to an environment, where my upstream servers are sending a custom header (X-No-Cache), which I need to detect and alter caching rules within the configuration. The custom header is visible within the output, and I can re-output it as another header throu