Skip to content

Update to latest MC::Role so we get stale-while-revalidate header #1377

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

Merged
merged 2 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ requires 'LWP::Protocol::https';
requires 'LWP::UserAgent', '6.66';
requires 'MetaCPAN::Moose';
requires 'MetaCPAN::Pod::HTML' => '0.004000';
requires 'MetaCPAN::Role', '0.06';
requires 'MetaCPAN::Role', '1.00';
requires 'MIME::Base64', '3.15';
requires 'Minion', '9.03';
requires 'Minion::Backend::SQLite';
Expand Down
14 changes: 7 additions & 7 deletions cpanfile.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -3540,18 +3540,18 @@ DISTRIBUTIONS
Pod::Simple::XHTML 3.45
URL::Encode 0.03
namespace::clean 0.27
MetaCPAN-Role-0.06
pathname: L/LL/LLAP/MetaCPAN-Role-0.06.tar.gz
MetaCPAN-Role-1.00
pathname: L/LL/LLAP/MetaCPAN-Role-1.00.tar.gz
provides:
MetaCPAN::Role 0.06
MetaCPAN::Role::Fastly 0.06
MetaCPAN::Role::Fastly::Catalyst 0.06
MetaCPAN::Role 1.00
MetaCPAN::Role::Fastly 1.00
MetaCPAN::Role::Fastly::Catalyst 1.00
requirements:
Carp 0
CatalystX::Fastly::Role::Response 0.04
CatalystX::Fastly::Role::Response 0.07
ExtUtils::MakeMaker 0
Moose::Role 0
MooseX::Fastly::Role 0.01
MooseX::Fastly::Role 0.04
Net::Fastly 1.05
Minion-10.31
pathname: S/SR/SRI/Minion-10.31.tar.gz
Expand Down
6 changes: 4 additions & 2 deletions t/server/controller/author.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ my %tests = (
cache_control => undef,
surrogate_key =>
'author=DOESNEXIST content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/author/MO' => {
code => 200,
cache_control => undef,
surrogate_key =>
'author=MO content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/author/_mapping' => {
code => 200,
Expand Down
12 changes: 8 additions & 4 deletions t/server/controller/changes.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ my $LOCAL_default_headers = {
cache_control => undef,
surrogate_key =>
'author=LOCAL content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
};

my $RWSTAUNER_default_headers = {
cache_control => undef,
surrogate_key =>
'author=RWSTAUNER content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
};

my @tests = (
Expand Down Expand Up @@ -53,7 +55,8 @@ my @tests = (
cache_control => undef,
surrogate_key =>
'author=NOEXISTY content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
}
],
[
Expand All @@ -63,7 +66,8 @@ my @tests = (
cache_control => undef,
surrogate_key =>
'author=NOAUTOR content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
}
],

Expand Down
6 changes: 4 additions & 2 deletions t/server/controller/diff.t
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ test_psgi app, sub {
cache_control => undef,
surrogate_key =>
'author=DOY content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
}
);

Expand All @@ -95,7 +96,8 @@ test_psgi app, sub {
cache_control => undef,
surrogate_key =>
'content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
}
);

Expand Down
6 changes: 4 additions & 2 deletions t/server/controller/file.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ my %tests = (
cache_control => undef,
surrogate_key =>
'author=DOES content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/file/DOY/Moose-0.01/lib/Moose.pm' => {
code => 200,
cache_control => undef,
surrogate_key =>
'author=DOY content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
);

Expand Down
6 changes: 4 additions & 2 deletions t/server/controller/module.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ my %tests = (
cache_control => undef,
surrogate_key =>
'author=DOY content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/module/Moose' => {
code => 200,
Expand Down Expand Up @@ -50,7 +51,8 @@ my %tests = (
cache_control => undef,
surrogate_key =>
'author=DOES content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},

);
Expand Down
12 changes: 8 additions & 4 deletions t/server/controller/pod.t
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ my @tests = (
cache_control => undef,
surrogate_key =>
'author=DOY content_type=application/json content_type=application',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
},
{
Expand All @@ -46,7 +47,8 @@ my @tests = (
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/html content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
},
{
Expand All @@ -56,7 +58,8 @@ my @tests = (
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/html content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
},
{
Expand All @@ -66,7 +69,8 @@ my @tests = (
cache_control => undef,
surrogate_key =>
'author=MO content_type=text/html content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
},
);
Expand Down
15 changes: 10 additions & 5 deletions t/server/controller/source.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,40 @@ my %tests = (
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/html content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000'
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000'
},
'/source/DOY/Moose-0.01/Changes' => {
code => 200,
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/plain content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/source/DOY/Moose-0.01/Changes?callback=foo' => {
code => 200,
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/javascript content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/source/DOY/Moose-0.01/MANIFEST' => {
code => 200,
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/plain content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/source/DOY/Moose-0.01/MANIFEST?callback=foo' => {
code => 200,
cache_control => undef,
surrogate_key =>
'author=DOY content_type=text/javascript content_type=text',
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
surrogate_control =>
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
},
'/source/Moose' => {
code => 200,
Expand Down