I use what Leif said and it works great. Our problem was origin sending
cache control and expire headers and negative response. Looks like the
negative caching param doesn't work as intended. I meant to send something
about it but could never get around testing it properly.

On Wednesday, April 6, 2016, Leif Hedstrom <zw...@apache.org> wrote:

>
> > On Apr 6, 2016, at 8:02 PM, Sudheer Vinukonda
> <sudhe...@yahoo-inc.com.INVALID> wrote:
> >
> > There's probably several ways of doing this (such as, disabling
> negative_caching etc), but, the most reliable way is to use header_rewrite
> to turn off http.cache on a non-200 response.
> >
> > Below's a sample config (I didn't test it myself, so, it may need some
> twiddling around):
> >
> > % cat plugin.config
> > header_rewrite.so negative_caching.config
> >
> >
> > % cat negative_caching.config
> >
> > cond %{READ_RESPONSE_HDR_HOOK} [AND]
> > cond %{STATUS} >=400
> > set-config proxy.config.http.cache.http 0 [L]
>
>
> Pretty sure that would not work, but try it. If it doesn’t work, then
> change it to something like
>
>         cond %{READ_RESPONSE_HDR_HOOK} [AND]
>         cond %{STATUS} >=400
>         set-header Cache-Control no-store,private
>
> or some such. I think turning off the cache at this stage is too late.
>
> — leif
>
>

Reply via email to