[web-doc] master: Add Cache-Control header to revcheck.php for improved caching (#70)

From: Date: Mon, 28 Sep 2026 10:37:29 +0000
Subject: [web-doc] master: Add Cache-Control header to revcheck.php for improved caching (#70)
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-2556@lists.php.net to get a copy of this message
Author: Luffy (sy-records) Committer: GitHub (web-flow) Pusher: derickr Date: 2026-09-28T11:37:26+01:00 Commit: https://github.com/php/web-doc/commit/378c52bcbacdbdf5b10a1bb46f2f30063073dd11 Raw diff: https://github.com/php/web-doc/commit/378c52bcbacdbdf5b10a1bb46f2f30063073dd11.diff Add Cache-Control header to revcheck.php for improved caching (#70) * Add Cache-Control header to revcheck.php for improved caching * Refactor site_header to accept configuration array and update Cache-Control handling in revcheck.php Changed paths: M include/lib_general.inc.php M www/revcheck.php Diff: diff --git a/include/lib_general.inc.php b/include/lib_general.inc.php index af48826..603bec8 100644 --- a/include/lib_general.inc.php +++ b/include/lib_general.inc.php @@ -28,7 +28,7 @@ function get_svn_dir($project) return $GLOBALS['PROJECTS'][$project][1] . '/'; } -function site_header() +function site_header(array $config = []) { $TITLE = 'Documentation Tools'; $SUBDOMAIN = 'doc'; @@ -38,6 +38,7 @@ function site_header() array('href' => '/revcheck.php', 'text' => 'Translation Status'), array('href' => '/phd.php', 'text' => 'PhD Homepage'), ); + $CONFIG = $config; require __DIR__ . '/../shared/templates/header.inc'; echo <<<END_OF_MULTILINE diff --git a/www/revcheck.php b/www/revcheck.php index 7d30004..229297d 100644 --- a/www/revcheck.php +++ b/www/revcheck.php @@ -51,7 +51,7 @@ die; } -site_header(); +site_header(['cache_control' => 3600]); switch($tool) { case 'translators': $translators = get_translators($dbhandle, $lang);

« previous php.doc.web (#2556) next »