Refactoring file cache driver.
This commit is contained in:
7
system/cache/file.php
vendored
7
system/cache/file.php
vendored
@@ -31,12 +31,7 @@ class File implements Driver {
|
|||||||
|
|
||||||
// The cache expiration date is stored as a UNIX timestamp at the beginning
|
// The cache expiration date is stored as a UNIX timestamp at the beginning
|
||||||
// of the cache file. We'll extract it out and check it here.
|
// of the cache file. We'll extract it out and check it here.
|
||||||
if (time() >= substr($cache, 0, 10))
|
if (time() >= substr($cache, 0, 10)) return $this->forget($key);
|
||||||
{
|
|
||||||
$this->forget($key);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return unserialize(substr($cache, 10));
|
return unserialize(substr($cache, 10));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user