mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Remove redundant Cache-Control directives
This commit is contained in:
parent
a1ce3ccaf2
commit
295ac7e61e
1 changed files with 3 additions and 3 deletions
|
|
@ -472,17 +472,17 @@ class Context
|
|||
{
|
||||
if($ttl == 0)
|
||||
{
|
||||
header('Cache-Control: ' . ($public ? 'public, ' : 'private, ') . 'must-revalidate, post-check=0, pre-check=0, no-store, no-cache');
|
||||
header('Cache-Control: ' . ($public ? '' : 'private, ') . 'must-revalidate, no-store, no-cache');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
}
|
||||
elseif($ttl == -1)
|
||||
{
|
||||
header('Cache-Control: ' . ($public ? 'public, ' : 'private, ') . 'must-revalidate, post-check=0, pre-check=0');
|
||||
header('Cache-Control: ' . ($public ? '' : 'private, ') . 'must-revalidate');
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Cache-Control: ' . ($public ? 'public, ' : 'private, ') . 'must-revalidate, max-age=' . (int)$ttl);
|
||||
header('Cache-Control: ' . ($public ? '' : 'private, ') . 'must-revalidate, max-age=' . (int)$ttl);
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + (int)$ttl) . ' GMT');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue