Skip to content

Commit 94d879d

Browse files
committed
Set cache headers for other pages as well, so we no longer need CDN Edge-Rules for these
1 parent 2725425 commit 94d879d

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

docs.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
$_SERVER['BASE_PAGE'] = 'docs.php';
66
include_once __DIR__ . '/include/prepend.inc';
77

8-
site_header("Documentation", ["current" => "docs"]);
9-
8+
site_header(
9+
"Documentation",
10+
[
11+
"current" => "docs",
12+
'intro' => $intro,
13+
'cache_control' => 5 * 60, // 5 minutes
14+
]
15+
);
1016
?>
1117

1218
<h1>Documentation</h1>

include/shared-manual.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ function manual_setup($setup): void {
325325
"prev" => $setup["prev"],
326326
"next" => $setup["next"],
327327
"cache" => $lastmod,
328+
'cache_control' => 5 * 60, // 5 minutes
328329
"description" => $setup["this"][2] ?? null,
329330
];
330331
site_header($setup["this"][1] . " - Manual", $config);

index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
],
136136
'css' => ['home.css'],
137137
'intro' => $intro,
138+
'cache_control' => 5 * 60, // 5 minutes
138139
],
139140
);
140141

releases/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
site_header("Releases", [
7676
'current' => 'downloads',
7777
'css' => '/styles/releases.css',
78+
'cache_control' => 60 * 60, // 60 minutes
7879
]);
7980

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

0 commit comments

Comments
 (0)