[PATCH] stale-while-revalidate updated
phk at phk.freebsd.dk
Thu Aug 28 08:49:25 CEST 2014
In message <53FE4EE5.7050507 at uplex.de>, Geoff Simmons writes:
>I think I'm unsure about what we're striving for in Varnish 4 --
>wasn't the goal to move as much caching policy as possible out to VCL,
>with good defaults in builtin.vcl?
Something like that.
It's a bit more complicated though.
The first design rule is to not make "the pascal mistake", by which
I mean that the writer of the VCL can _always_ do what he wants to do.
That means that as a general rule we cannot call VCL and then munge
headers afterwards in C-code, we should always do that before VCL
or as a result of things done in VCL.
That is not _always_ possible and certainly not always desirable.
For instance, we don't want to send 'T-E: Chunked' unless we are
actually going to deliver the object using our chunked code-path,
no matter what the VCL writer might think.
The trick here is to try to put a dividing line between stuff which
is protocol (T-E: Chunked, Content-Length etc.) and things which are
policy (Vary, A-E, etc.)
Given how utterly messed up the HTTP "standard" is, that is not
anywhere as easy as it should be.
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.
More information about the varnish-dev