Skip to content

Commit

Permalink
Remove support of s-maxage
Browse files Browse the repository at this point in the history
Seems to only make sense for CDNs
  • Loading branch information
Alkarex committed Sep 18, 2024
1 parent 9cf1883 commit d70f420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HTTP/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function negociate_cache_expiration_time(array $http_headers, int
if (preg_match('/\bmust-revalidate\b/', $cache_control)) {
$cache_duration = $cache_duration_min;
}
if (preg_match('/\bs-maxage=(\d+)\b/', $cache_control, $matches) || preg_match('/\bmax-age=(\d+)\b/', $cache_control, $matches)) {
if (preg_match('/\bmax-age=(\d+)\b/', $cache_control, $matches)) {
$max_age = (int) $matches[1];
$age = $http_headers['age'] ?? '';
if (is_numeric($age)) {
Expand Down

0 comments on commit d70f420

Please sign in to comment.