Key HTTP Response Header Field

Dridi Boukelmoune dridi.boukelmoune at zenika.com
Sun Jul 28 20:41:22 CEST 2013


Hi,

AFAIK Varnish can use any data to build the cache key, the default VCL
uses the host and url from the request:

///
sub vcl_hash {
    hash_data(req.url);
    if (req.http.host) {
        hash_data(req.http.host);
    } else {
        hash_data(server.ip);
    }
    return (hash);
}
///

The 'Key' header being 'cache policy', I believe it belongs in your
VCL and not in Varnish. After reading bits of the draft, VCL should be
enough to build such a header, no vmod required.

My 2 cents :)
Dridi

PS. thank you for the link, this is very interesting


On Sun, Jul 28, 2013 at 6:05 PM, Josh Bussdieker
<josh.bussdieker at moovweb.com> wrote:
> I'm considering adding support for the HTTP Key response header as described
> here: http://tools.ietf.org/html/draft-fielding-http-key-02
>
> I had a few questions about how to proceed:
> 1. Are there any plans to implement this feature?
> 2. Would this be possible using a vmod?
> 3. Assuming it wouldn't be possible with a vmod. Would a patch to add
> support be welcomed?
>
> Thanks,
>
> --
> Joshua B. Bussdieker
> Operations Engineer
> Moovweb
> 201 Spear St
> 3rd Floor
> San Francisco, CA 94107
> http://moovweb.com
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev



More information about the varnish-dev mailing list