if (req.backend.is_origin) {
  # We're on the shield
  set beresp.http.X-Shield-Generation = req.vcl.generation;
} else {
  # We're on the edge
  declare local var.local INTEGER;
  set var.local = std.atoi(req.vcl.generation);
  if (std.atoi(beresp.http.X-Shield-Generation) < var.local) {
    set beresp.ttl = 1s;
  }
  set beresp.http.X-Edge-Generation = req.vcl.generation;
}