mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ab776401db
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@68901 467b73ca-7a2a-4603-9d3b-597d59a354a9
29 lines
802 B
Cheetah
29 lines
802 B
Cheetah
<?php
|
|
|
|
/**
|
|
* This is a system-generated PHP script that performs header management for the statically cached content given below.
|
|
*/
|
|
|
|
define('MAX_AGE', '**MAX_AGE**');
|
|
define('LAST_MODIFIED', '**LAST_MODIFIED**');
|
|
|
|
if(MAX_AGE > 0) {
|
|
header("Cache-Control: max-age=" . MAX_AGE);
|
|
header("Pragma:");
|
|
} else {
|
|
header("Cache-Control: no-cache, max-age=0, must-revalidate");
|
|
}
|
|
|
|
header("Expires: " . gmdate('D, d M Y H:i:s', time() + MAX_AGE) . ' GMT');
|
|
header("Last-modified: " . gmdate('D, d M Y H:i:s', strtotime(LAST_MODIFIED)) . ' GMT');
|
|
|
|
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
|
|
if(strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= strtotime(LAST_MODIFIED)) {
|
|
header("Last-modified: " . gmdate('D, d M Y H:i:s', strtotime(LAST_MODIFIED)) . ' GMT', true, 304);
|
|
exit;
|
|
}
|
|
}
|
|
|
|
?>
|
|
**CONTENT**
|