caching - Create cache depending on a variable stored in cookie with Varnish and Magento -


let's have variable, can either 1, 2 or 3, stored in user cookie. eg: foo=2

the first time access pagex foo=2, page shall cached. next visitors foo=2 in cookie shall see same version (hit).

the first time access pagex foo=1, page shall cached (as second version). next visitors foo=1 in cookie shall see specific version (hit).

same principle foo=3

in other words, pages of website have 3 versions, if same url, 1 each value of foo in visitor's cookie.

is feasible?

thanks, rod

i think answer looking can found in varnish docs https://www.varnish-cache.org/trac/wiki/vclexamplecachingloggedinusers

there example in how use cookie variable create unique hash.

this used create different pages same url. careful browsercache settings of page. may page change url , browser cache set high might strange behaviour.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -