Changeset 2393
- Timestamp:
- 04/01/2008 03:55:18 AM (8 months ago)
- Location:
- trunk/system/libraries/drivers/Cache
- Files:
-
- 5 modified
-
Apc.php (modified) (2 diffs)
-
Eaccelerator.php (modified) (2 diffs)
-
File.php (modified) (2 diffs)
-
Memcache.php (modified) (1 diff)
-
Xcache.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Cache/Apc.php
r2007 r2393 27 27 count($tags) and Log::add('error', 'Cache: tags are unsupported by the APC driver'); 28 28 29 // APC expects time to live, not a unix timestamp 30 if ($expiration !== 0) 31 { 32 $expiration -= time(); 33 } 34 29 35 return apc_store($id, $data, $expiration); 30 36 } … … 38 44 { 39 45 if ($id === TRUE) 40 {41 46 return apc_clear_cache('user'); 42 } 43 elseif ($tag == FALSE) 44 { 47 48 if ($tag == FALSE) 45 49 return apc_delete($id); 46 } 47 else 48 { 49 return true; 50 } 50 51 return TRUE; 51 52 } 52 53 -
trunk/system/libraries/drivers/Cache/Eaccelerator.php
r2007 r2393 32 32 count($tags) and Log::add('error', 'tags are unsupported by the eAccelerator driver'); 33 33 34 // eAccelerator expects time to live, not a unix timestamp 35 if ($expiration !== 0) 36 { 37 $expiration -= time(); 38 } 39 34 40 return eaccelerator_put($id, $data, $expiration); 35 41 } … … 38 44 { 39 45 if ($id === TRUE) 40 {41 46 return eaccelerator_clean(); 42 } 43 elseif ($tag == FALSE) 44 { 47 48 if ($tag == FALSE) 45 49 return eaccelerator_rm($id); 46 } 47 else 48 { 49 return TRUE; 50 } 50 51 return TRUE; 51 52 } 52 53 -
trunk/system/libraries/drivers/Cache/File.php
r2007 r2393 204 204 /** 205 205 * Deletes all cache files that are older than the current time. 206 * 207 * @return void 206 208 */ 207 209 public function delete_expired() … … 222 224 /** 223 225 * Check if a cache file has expired by filename. 226 * 227 * @param string filename 228 * @return bool 224 229 */ 225 230 protected function expired($file) -
trunk/system/libraries/drivers/Cache/Memcache.php
r2007 r2393 55 55 { 56 56 if ($id === TRUE) 57 {58 57 return $this->backend->flush(); 59 } 60 elseif ($tag == FALSE) 61 { 58 59 if ($tag == FALSE) 62 60 return $this->backend->delete($id); 63 } 64 else 65 { 66 return TRUE; 67 } 61 62 return TRUE; 68 63 } 69 64 -
trunk/system/libraries/drivers/Cache/Xcache.php
r2007 r2393 29 29 { 30 30 count($tags) and Log::add('error', 'Cache: tags are unsupported by the Xcache driver'); 31 32 // XCache expects time to live, not a unix timestamp 33 if ($expiration !== 0) 34 { 35 $expiration -= time(); 36 } 31 37 32 38 return xcache_set($id, $data, $expiration);
