Set lower TTL only for your front page

To lower the load on my backend I increased the TTL value for all content except for front page. This is really simple as shown below.


sub vcl_fetch {
# TTL for front page
if ((req.url == "/")){
set beresp.ttl = 30s;
} else {
set beresp.ttl = 240s;
}
}

Tags

Set lower TTL only for your front page