Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added cdn_max_age to endpoints using add_dist_key
  • Loading branch information
mickeyn committed Aug 23, 2017
1 parent ae8baa3 commit 805cbd2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/MetaCPAN/Server/Controller/Release.pm
Expand Up @@ -87,6 +87,7 @@ sub by_author : Path('by_author') : Args(1) {
sub latest_by_distribution : Path('latest_by_distribution') : Args(1) {
my ( $self, $c, $dist ) = @_;
$c->add_dist_key($dist);
$c->cdn_max_age('1y');
$c->stash_or_detach( $self->model($c)->latest_by_distribution($dist) );
}

Expand All @@ -105,6 +106,7 @@ sub all_by_author : Path('all_by_author') : Args(1) {
sub versions : Path('versions') : Args(1) {
my ( $self, $c, $dist ) = @_;
$c->add_dist_key($dist);
$c->cdn_max_age('1y');
$c->stash_or_detach( $self->model($c)->versions($dist) );
}

Expand Down

0 comments on commit 805cbd2

Please sign in to comment.