Using obj.hits, clearly a hit and miss affair

VCL is awesome, but it's also a bit frightening to newcomers, and most of the time, people are more interested in something that "just works"™ than "doing the right thing"™ and they google their way out of it.

Problem is that the first thing that sort of works isn't necessarily the right thing, and the proliferation of one particular code snippet is what prompted the writing of this post. The snippet in question? This guy:

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

Recognize it? Have it somewhere in your code, maybe? If so, read on, and let's try to do the right thing, and hopefully, get a better setup thanks to it. Don't worry, this is a short one, so hop in.

Read More

7/26/18 1:00 PM
by Guillaume Quintard

Sync up: Akamai Connector for Varnish takes a load off

A few months ago, we announced the Akamai Connector for Varnish. We released it on a limited scale to give users the chance to test it out and see what it could do for them. Now the release goes wide. All Akamai customers who also use Varnish can get the Akamai Connector for Varnish to leverage the scalability and performance of the Akamai platform within the familiar Varnish VCL interface.

Read More

5/8/17 6:00 PM
by Erika Wolfe

10 Varnish Cache mistakes and how to avoid them

1. Caching set cookies

Read More

8/21/14 11:19 AM
by Espen Braastad

Varnish Software Blog

The Varnish blog is where our team writes about all things related to Varnish Cache and Varnish Software...or simply vents.



Posts by Topic

see all