Update of /cvsroot/fink/web/pdb
In directory sc8-pr-cvs17:/tmp/cvs-serv20487
Modified Files:
header.inc index.php
Log Message:
allow overriding cache hint, set to 2 hours for index, since it rarely changes
Index: header.inc
===================================================================
RCS file: /cvsroot/fink/web/pdb/header.inc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- header.inc 27 Sep 2007 19:51:08 -0000 1.16
+++ header.inc 27 Sep 2007 23:11:22 -0000 1.17
@@ -13,8 +13,13 @@
exit();
}
-header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
-header("Cache-Control: max-age=3600, s-maxage=900");
+if (!$cache_timeout) {
+ // 1 hour
+ $cache_timeout = 3600;
+}
+
+header("Expires: " . gmdate("D, d M Y H:i:s", time() + $cache_timeout) . "
GMT");
+header("Cache-Control: max-age=" . $cache_timeout . ", s-maxage=" .
($cache_timeout / 2));
/* check path info */
$PATH_INFO = $HTTP_SERVER_VARS["PATH_INFO"];
Index: index.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/index.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- index.php 27 Sep 2007 23:03:14 -0000 1.26
+++ index.php 27 Sep 2007 23:11:22 -0000 1.27
@@ -3,6 +3,9 @@
$cvs_author = '$Author$';
$cvs_date = '$Date$';
+// 2 hours, this page does not change much
+$cache_timeout = 7200;
+
include "header.inc";
include "memcache.inc";
?>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits