Mailing List Archive

Varnish Hash
Just to make this clear, does varnish identify an object like this in vcl_hash?

sub vcl_hash {
set req.hash += req.url;
set req.hash += req.http.host;
hash;
}

/ Erik
Varnish Hash [ In reply to ]
In message <d4284sx3kke05yf.061220071449 at torlen.net>, Erik writes:
>Just to make this clear, does varnish identify an object like this in vcl_hash?
>
> sub vcl_hash {
> set req.hash += req.url;
> set req.hash += req.http.host;
> hash;
> }

Well, mostly. That is the primary identification, but each match
can have multiple different objects, depending on the Vary header
and ttl.

--
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 Hash [ In reply to ]
On Dec 6, 2007, at 2:34 PM, Poul-Henning Kamp wrote:

> In message <d4284sx3kke05yf.061220071449 at torlen.net>, Erik writes:
>> Just to make this clear, does varnish identify an object like this
>> in vcl_hash?
>>
>> sub vcl_hash {
>> set req.hash += req.url;
>> set req.hash += req.http.host;
>> hash;
>> }
>
> Well, mostly. That is the primary identification, but each match
> can have multiple different objects, depending on the Vary header
> and ttl.


Apologies for butting into this thread...

Multiple objects depending on ttl? Can you elaborate?

Also, how are purges done when variations exist? I'm guessing all
variations get purged. Is this correct?

Ric
Varnish Hash [ In reply to ]
In message <36256474-9C9D-4C1C-9CE8-12AD5D5EE682 at digitalmarbles.com>, Ricardo N
ewbery writes:

>> In message <d4284sx3kke05yf.061220071449 at torlen.net>, Erik writes:
>>> Just to make this clear, does varnish identify an object like this
>>> in vcl_hash?
>>>
>>> sub vcl_hash {
>>> set req.hash += req.url;
>>> set req.hash += req.http.host;
>>> hash;
>>> }
>>
>> Well, mostly. That is the primary identification, but each match
>> can have multiple different objects, depending on the Vary header
>> and ttl.
>
>Apologies for butting into this thread...
>
>Multiple objects depending on ttl? Can you elaborate?

That's a technical feature we need for prefetch to work.

>Also, how are purges done when variations exist? I'm guessing all
>variations get purged. Is this correct?

Correct.

--
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.