# Keep all these cookie
if (req.http.Cookie) {
set req.http.Cookie = ";" + req.http.Cookie;
set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";");
set req.http.Cookie = regsuball(req.http.Cookie, ";(location|usertype|viewed-products)=", "; \1=");
set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", "");
set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", "");
if (req.http.Cookie == "") {
unset req.http.Cookie;
}
}
I have this varnish config, and I added 3 new cookies, so do I need to change anything? In my understanding, even if I added 3 new cookies, the only cookies that will be used for determining which cached values you're going to receive from varnish are solely determined by those you keep in the configs, so they will be determined by location, usertype and viewed products. Since we only have 2 location, 3 user types and 3 products, we can't have more than 332 18 different cache values. Am I correct?