Skip to content

Commit 65fe1f3

Browse files
committed
Make redirect cache shorter for pod as can be versioned
1 parent b418668 commit 65fe1f3

File tree

1 file changed

+4
-1
lines changed
  • lib/MetaCPAN/Web/Controller

1 file changed

+4
-1
lines changed

lib/MetaCPAN/Web/Controller/Pod.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ sub view : Private {
4040
my $release = $c->stash->{release};
4141

4242
if ( $data->{directory} ) {
43-
$c->cdn_max_age('1y');
43+
44+
# This can end up being a redirect from a non-versioned path to a versioned path
45+
# and it doesn't have any surrogate keys so it won't get purged.
46+
$c->cdn_max_age('1d');
4447
$c->res->redirect( $c->uri_for( '/source', @path ), 301 );
4548
$c->detach;
4649
}

0 commit comments

Comments
 (0)