-
Notifications
You must be signed in to change notification settings - Fork 236
Better caching and serve from cache more #3374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8596da9
to
8b9ac53
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3374 +/- ##
==========================================
+ Coverage 73.37% 73.48% +0.11%
==========================================
Files 68 67 -1
Lines 2385 2346 -39
Branches 334 331 -3
==========================================
- Hits 1750 1724 -26
+ Misses 507 496 -11
+ Partials 128 126 -2
🚀 New features to boost your workflow:
|
115d573
to
9c8e023
Compare
lib/MetaCPAN/Web/Controller/Pod.pm
Outdated
@@ -40,6 +40,7 @@ sub view : Private { | |||
my $release = $c->stash->{release}; | |||
|
|||
if ( $data->{directory} ) { | |||
$c->cdn_max_age('1y'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can end up being a redirect from a non-versioned path to a versioned path, and it doesn't have any surrogate keys so it won't get purged.
IF reach the main /end we enable
These only take effect if
cdn_max_age
has been setAlso added caching on /search - which is where most of our traffic ends up
https://www.fastly.com/documentation/guides/concepts/edge-state/cache/stale/ shows the timeline