On Fri, Oct 21, 2011 at 7:38 PM, S Ahmed <[email protected]> wrote:
> WHen a page gets cached in varnish, is it possible to have some sort of > html flag so by looking at the html you can see when it was cached in > varnish? > > e.g. > > > <!-- varnish cached at 20111021 5:44pm --> > > I'm using ruby on rails. > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > sub vcl_deliver { if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } else { set resp.http.X-Cache = "MISS"; } } Check the header of the elements (html or jpg or gif, etc) on your website, u will see something as... X-Cache HIT or X-Cache MISS
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
