diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-09-23 21:30:03 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-09-23 21:30:03 -0700 |
commit | e5926823b0876377a04fbe47605f3524d5a67f21 (patch) | |
tree | 1a1b6bc3d5413c9631a965abf2a20c83f7b5c33b /engine/handlers/cache_handler.php | |
parent | cc23bbddb8f2367f33e6291b13354c4cd98cd97b (diff) | |
download | elgg-e5926823b0876377a04fbe47605f3524d5a67f21.tar.gz elgg-e5926823b0876377a04fbe47605f3524d5a67f21.tar.bz2 |
Refs #3859. Using PHP internal functions to expire cache in +6 months instead of doing math manually to avoid int overflow.
Diffstat (limited to 'engine/handlers/cache_handler.php')
-rw-r--r-- | engine/handlers/cache_handler.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/handlers/cache_handler.php b/engine/handlers/cache_handler.php index 7d6f42dc3..94a0e64e9 100644 --- a/engine/handlers/cache_handler.php +++ b/engine/handlers/cache_handler.php @@ -64,7 +64,7 @@ $view = $matches[3]; switch ($type) { case 'css': header("Content-type: text/css", true); - header('Expires: ' . date('r', time() + 86400000), true); + header('Expires: ' . date('r', strtotime("+6 months")), true); header("Pragma: public", true); header("Cache-Control: public", true); @@ -72,7 +72,7 @@ switch ($type) { break; case 'js': header('Content-type: text/javascript', true); - header('Expires: ' . date('r', time() + 864000000), true); + header('Expires: ' . date('r', strtotime("+6 months")), true); header("Pragma: public", true); header("Cache-Control: public", true); |