public function fetch ($key) {
if ($this->exists($key)) {
$cacheTime = $this->getCacheTime($key);
- if ($cacheTime['ttl'] > 0 && (TIME_NOW - $cacheTime['mtime']) > $cacheTime['ttl']) {
+ if ($cacheTime['ttl'] > 0 && (time() - $cacheTime['mtime']) > $cacheTime['ttl']) {
$this->delete($key);
return null;
}
unset($cache['atime']);
}
+ if (isset($cache['modification_time'])) {
+ $cache['mtime'] = $cache['modification_time'];
+ unset($cache['modification_time']);
+ }
+
$info[] = $cache;
}
}