From d70f42002f7fbdbb583921e27e1d81a4f1e10e57 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 18 Sep 2024 21:44:13 +0200 Subject: [PATCH] Remove support of s-maxage Seems to only make sense for CDNs --- src/HTTP/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HTTP/Utils.php b/src/HTTP/Utils.php index d043005e..fdd9c61a 100644 --- a/src/HTTP/Utils.php +++ b/src/HTTP/Utils.php @@ -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)) {