summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2012-09-16 19:16:33 +0200
committervlakoff <vlakoff@gmail.com>2012-09-16 19:16:33 +0200
commit239e0e598f0b9462e195db5da658095eb70cf6e3 (patch)
tree084144197bca37061ca6731370063a1b96f27f28 /system/core/Output.php
parentb16dd29147fa8155cb9d9dadfb7c587aef81d772 (diff)
Better method for getting Output cache file embedded timestamp
Faster, shorter code
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 847c61e3e..052367ed6 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -552,13 +552,13 @@ class CI_Output {
fclose($fp);
// Strip out the embedded timestamp
- if ( ! preg_match('/^\d+TS--->/', $cache, $match))
+ if ( ! preg_match('/^(\d+)TS--->/', $cache, $match))
{
return FALSE;
}
$last_modified = filemtime($cache_path);
- $expire = str_replace('TS--->', '', $match[0]);
+ $expire = $match[1];
// Has the file expired?
if ($_SERVER['REQUEST_TIME'] >= $expire && is_really_writable($cache_path))