Currently I'm running Varnish on a server which runs about 30-40 different websites. All of these websites use the same library for handling requests (every website has it's own domain). However some of these websites are very simple and can be fully cached. What I would like to do is enable a flag in a project/website (certain header) that tells varnish to cache the request once delivered. Is such a construction possible because I don't want to edit the VCL for every project that can be fully cached and add an entry to vcl_fetch like:
if (req.http.host ~ "<website>")
{
unset req.http.cookie;
return (lookup)
}
Is there a proper way to do this? I did look at the Varnish flowchart but can't come up with a good solution.
Thanks in advance!