Hi all,

So, as it stands we have the fairly common set up in our vcl_deliver to add a 
header to indicate whether or not the object was served from cache or not:

    if (obj.hits > 0)
    {
        set resp.http.X-Cache = "HIT";
    }
    else
    {
        set resp.http.X-Cache = "MISS";
    }

Now, in addition to this, I was wondering if it would be possible to add a 
header to indicate whether or not we attempted to fetch the object from cache, 
i.e. if the request had gone through vcl_fetch or vcl_pass. My initial thought 
was to add some form of header in those subroutines but obviously I'm not able 
to access resp here. Is there anything that obj would be able to tell me in 
vcl_deliver about this?

Thanks for any help,
Connor

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to