[PHP-WEBMASTER] [web-php] master: Set cache headers for other pages as well, so we no longer need CDN Edge-Rules for these

Author: Derick Rethans (derickr)
Date: 2026-07-03T11:23:43+01:00

Commit: Set cache headers for other pages as well, so we no longer need CDN E… · php/web-php@94d879d · GitHub
Raw diff: https://github.com/php/web-php/commit/94d879de808650ce4fbf8c1ec0b9fb383b84541c.diff

Set cache headers for other pages as well, so we no longer need CDN Edge-Rules for these

Changed paths:
  M docs.php
  M include/shared-manual.inc
  M index.php
  M releases/index.php

Diff:

diff --git a/docs.php b/docs.php
index dff30bee3c..59f33bf3c4 100644
--- a/docs.php
+++ b/docs.php
@@ -5,8 +5,14 @@
$_SERVER['BASE_PAGE'] = 'docs.php';
include_once __DIR__ . '/include/prepend.inc';

-site_header("Documentation", ["current" => "docs"]);
-
+site_header(
+ "Documentation",
+ [
+ "current" => "docs",
+ 'intro' => $intro,
+ 'cache_control' => 5 * 60, // 5 minutes
+ ]
+);
?>

<h1>Documentation</h1>
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index 821b2704ba..309c649e77 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -325,6 +325,7 @@ function manual_setup($setup): void {
         "prev" => $setup["prev"],
         "next" => $setup["next"],
         "cache" => $lastmod,
+ 'cache_control' => 5 * 60, // 5 minutes
         "description" => $setup["this"][2] ?? null,
     ];
     site_header($setup["this"][1] . " - Manual", $config);
diff --git a/index.php b/index.php
index 9e24fc8c5f..a297e027e8 100644
--- a/index.php
+++ b/index.php
@@ -135,6 +135,7 @@
         ],
         'css' => ['home.css'],
         'intro' => $intro,
+ 'cache_control' => 5 * 60, // 5 minutes
     ],
);

diff --git a/releases/index.php b/releases/index.php
index 6276162a5a..6044ae8a3d 100644
--- a/releases/index.php
+++ b/releases/index.php
@@ -75,6 +75,7 @@
site_header("Releases", [
     'current' => 'downloads',
     'css' => '/styles/releases.css',
+ 'cache_control' => 60 * 60, // 60 minutes
]);

echo "<h1>Unsupported Historical Releases</h1>\n\n";