I want to print the Cache Key of a request so that i can verify that we are only caching the object once. Our setup runs a multidomain site but the problem is within each apex domain there are subdomains like www, example1, example2 now i don't want to cache each page based on host within a given apex domain.
So i have written the following vcl snippet
set req.hash += req.url;
set req.hash += std.strstr(req.http.host, "myapexdomain");
set req.hash += "#####GENERATION#####";
set req.http.plpagehash = hash;
But i want to send back the Hash - Cache key as part of the response so i can make sure this really works. It seems like there is no way to get the string representation of the Hash object. Is there a way to send back the Cache key in a custom header.
Please sign in to leave a comment.