Varnish caches objects per session for www.vg.no ?

Michael Lee michael.lee at zerustech.com
Fri Dec 21 12:14:33 CET 2007


Hi Guys,

I noticed a possible issue on www.vg.no today, I guess the varnish cache on this site was configured to cache objects per user session. Which means, cached objects can't be re-used across different users.

I tried the following test cases:

1. clean up cookies and temporary internet files from my browser (I'm using Mandriva linux 2007 and Firefox 2.0.0.11)

2. Access http://www.vg.no

3. Check the http response header and got a "HTTP/1.x 200 OK" response. (cache miss)

4. Reload page and got a "HTTP/1.x 304 Not Modified
" response. (cache hit)

Does it mean that the first time when I accessed www.vg.no, the cache was missed? So varnish re-fetched the contents for me. And the 2nd time, cache was hit. 

I know that specifying "cookie" as part of the object hash in vcl_hash() may force varnish to cache objects per user session. But is www.vg.no using the same approach? Besides, does it make sense to cache objects per user session for www.vg.no?


Is there anyone can help investigate?

Many thanks in advance,

Michael

-- 
Michael Lee / Managing Director / ZerusTech Ltd

Tel: +86 (21) 6428 3803
Fax: +86 (21) 6428 3805
Mobile: +86 139 1663 5259
Skype: zerustech
Gmail: zerustech at gmail.com

www.zerustech.com

Suite 819-820
807 Zhaojiabang Road
Shanghai
P.R.China
200030



More information about the varnish-commit mailing list