Hi. I'm starting the tests to migrate to v4 and I have an issue setting
headers to detect the HIT/MISS.

In v3 I was using the method described in 
https://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader

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

But now in varnish 4 when an url is banned the Age is reseted but obj.hits 
seems to remain the same

I've found this excerpt indicating the change of behaviour in obj.hits

https://www.varnish-cache.org/docs/trunk/whats-new/upgrading.html#obj-is-now-read-only


The bug indicated was closed indicating that obj.hits = 0 no longer indicates a 
cache MISS

So. How and where I can detect the handling and set a response header to 
indicate a real HIT/MISS?

Thanks




-- 
Carlos Peñas San José
[email protected]


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

Reply via email to