Mailing List Archive

Any way to control caching based on http status code?
Hi there,

I'm looking for a way to avoid caching http responses from the backend
with specific status codes such as 302.

Is there any way to express that with vcl?


Regards,

Anton
Any way to control caching based on http status code? [ In reply to ]
In message <45DB5397.3030301 at giraffen.dk>, Anton Stonor writes:
>Hi there,
>
>I'm looking for a way to avoid caching http responses from the backend
>with specific status codes such as 302.
>
>Is there any way to express that with vcl?

Not right now, please open a ticket so we don't forget.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Any way to control caching based on http status code? [ In reply to ]
On 2/20/07, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
>
> In message <45DB5397.3030301 at giraffen.dk>, Anton Stonor writes:
> >Hi there,
> >
> >I'm looking for a way to avoid caching http responses from the backend
> >with specific status codes such as 302.
> >
> >Is there any way to express that with vcl?
>
> Not right now, please open a ticket so we don't forget.
>
> --
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG | TCP/IP since RFC 956
> FreeBSD committer | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by
> incompetence.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>



I recently had this same issue as far as Authorizations are concerned. We
were having an issue where let's say an authorized file was accessed with an
unauthorized access attempt it would cache the unauthorized attempt [Code:
401] and return that to a valid credential holding user. I got around it
like this. (patch attached) [probably not the best method] In your case you
would replace the 401 with 302.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20070220/8f0cd70c/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filterRespCode.patch
Type: application/octet-stream
Size: 389 bytes
Desc: not available
Url : http://projects.linpro.no/pipermail/varnish-misc/attachments/20070220/8f0cd70c/attachment.obj