1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Cache testing

This commit is contained in:
Cameron
2013-03-20 05:55:15 -07:00
parent 0ed35fbb80
commit a288729f31
2 changed files with 4 additions and 3 deletions

View File

@@ -405,10 +405,10 @@ if (isset($_SERVER['HTTP_IF_NONE_MATCH']))
}
header("Cache-Control: must-revalidate"); // XXX testing 'always on' state for now.
if(!defined('e_NOCACHE'))
{
header("Cache-Control: must-revalidate");
// header("Cache-Control: must-revalidate");
}

View File

@@ -335,9 +335,10 @@ $etag = md5($page);
//header('Pragma:');
// previously disabled or there is posted data
$canCache = e107::canCache();
header("Cache-Control: must-revalidate", true);
if($canCache && !deftrue('e_NOCACHE') && $_SERVER['REQUEST_METHOD'] === 'GET' && $_SERVER['QUERY_STRING'] != 'logout')
{
header("Cache-Control: must-revalidate", true);
// header("Cache-Control: must-revalidate", true);
if(e107::getPref('site_page_expires')) // TODO - allow per page
{
if (function_exists('date_default_timezone_set'))