Details
-
Type:
Patch
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.9.2
-
Fix Version/s: 1.5.0
-
Component/s: Zend_Cache
-
Labels:None
Description
Exist a particular reason to save expire timestamp in the cache file name ?
If not the system must not search cached file
private function _file($id, $expire = null) { $path = $this->_path($id); if (is_null($expire)) { $glob = @glob($path . $this->_idToFileName($id, '*')); //?????????????????? $nbr = count($glob); if ($nbr == 1) { return $glob[0]; } return null; } $fileName = $this->_idToFileName($id, $expire); return $path . $fileName; }
and on load a cache id this method will call on test expire date and on read file
It is superior to write the expire timestamp as first byte in the file -> better performance
on test read only the first byte and unpack this to a integer and on load the opened file must not close after testing expire date
Attachments
Issue Links
| This issue depends on: | ||||
| ZF-2449 | Complete refactoring of the file backend |
|
|
|
Zend_Cache related issue, assigned to Fabien