We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae0f4de commit dc5fc66Copy full SHA for dc5fc66
lib/MetaCPAN/Web/Controller/Feed.pm
@@ -304,6 +304,17 @@ sub end : Private {
304
my $feed = $c->stash->{feed};
305
$c->detach('/end')
306
if !$feed;
307
+
308
309
+# This will only affect if `cdn_max_age` has been set.
310
+# https://www.fastly.com/documentation/guides/concepts/edge-state/cache/stale/
311
+# If it has then do revalidation in the background
312
+ $c->cdn_stale_while_revalidate('1d');
313
314
+ # And if there is still an error serve from cache
315
+ $c->cdn_stale_if_error('1y');
316
317
318
$c->res->content_type(
319
$feed->isa('XML::FeedPP::Atom')
320
? 'application/atom+xml; charset=UTF-8'
0 commit comments