Skip to content

Commit

Permalink
Update to match integration stale content handling
Browse files Browse the repository at this point in the history
This is to allow integration to match logic in PR:
#82
  • Loading branch information
MahmudH committed Jun 4, 2024
1 parent 075ecaa commit ff595e1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/datagovuk/datagovuk.vcl.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,13 @@ sub vcl_fetch {
return (pass);
}

if (beresp.status == 500 || beresp.status == 503) {
set beresp.ttl = 1s;
set beresp.stale_if_error = 5s;
return (deliver);
}
%{ if environment != "integration"}
if (beresp.status == 500 || beresp.status == 503) {
set beresp.ttl = 1s;
set beresp.stale_if_error = 5s;
return (deliver);
}
%{ endif ~}

if (beresp.http.Expires || beresp.http.Surrogate-Control ~ "max-age" || beresp.http.Cache-Control ~"(s-maxage|max-age)") {
# keep the ttl here
Expand Down

0 comments on commit ff595e1

Please sign in to comment.