From 1e6de36ba5655ec32911eacb524926589cc0c199 Mon Sep 17 00:00:00 2001 From: Jonah Lawrence Date: Thu, 5 Oct 2023 15:44:06 -0600 Subject: [PATCH] chore: Increase cache headers to 3 hours (#611) --- src/index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.php b/src/index.php index 41cc4e0b..610543ad 100644 --- a/src/index.php +++ b/src/index.php @@ -19,10 +19,11 @@ renderOutput($message, 500); } -// set cache to refresh once per hour -header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT"); +// set cache to refresh once per three horus +$cacheMinutes = 3 * 60 * 60; +header("Expires: " . gmdate("D, d M Y H:i:s", time() + $cacheMinutes) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); -header("Cache-Control: public, max-age=3600"); +header("Cache-Control: public, max-age=$cacheMinutes"); // redirect to demo site if user is not given if (!isset($_REQUEST["user"])) {