Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
silly typo fix on header and force browser cache miss
  • Loading branch information
ranguard committed May 5, 2015
1 parent d2f49ce commit 61fa747
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/MetaCPAN/Web/Controller/Account/Favorite.pm
Expand Up @@ -58,6 +58,9 @@ sub list_as_json : Local {
$c->add_surrogate_key( $self->_cache_key_for_user($c) );
$c->cdn_cache_ttl( 86_400 * 30 ); # 30 days

# Make sure the user re-requests from Fastly each time
$c->res->header( 'Cache-Control' => 'max-age=0, no-store, no-cache' );

$c->detach( $c->view('JSON') );
}

Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Web/Role/Fastly.pm
Expand Up @@ -90,7 +90,7 @@ sub fastly_magic {
elsif ( my $ttl = $c->cdn_cache_ttl ) {

# Use this value
$c->res->header( 'Surrogate-Control' => 'max_age=' . $ttl );
$c->res->header( 'Surrogate-Control' => 'max-age=' . $ttl );

}
elsif ( !$c->res->header('Last-Modified') ) {
Expand Down

0 comments on commit 61fa747

Please sign in to comment.