Logged-in users

Per Buer perbu at linpro.no
Thu Nov 27 11:22:16 CET 2008


Miles skrev:

> My question is, how can I organise the cache to have the most cache 
> hits, given that there are effectively two versions of each page - one 
> for logged in users, and one for anonymous users.

ESI has already been pointed out as the ideal way of handling this. You
might also consider issuing a "Vary: $USER" header so Varnish will keep
a copy for each user (this might bloat your cache, be careful) or set a
custom header for logged inn users (X-foo: logged in as bar) and then
pick this header up in vcl_recv and do a "pass" on the relevant request.

-- 
Per Buer - Leder Infrastruktur og Drift - Redpill Linpro
Telefon: 21 54 41 21 - Mobil: 958 39 117
http://linpro.no/ | http://redpill.se/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20081127/df22d91d/attachment-0003.pgp>


More information about the varnish-misc mailing list