mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix coding standards in Cache/
This commit is contained in:
parent
9d325fe46e
commit
04c843b17b
6 changed files with 10 additions and 4 deletions
|
@ -477,5 +477,6 @@ class Cache {
|
|||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ abstract class CacheEngine {
|
|||
* Permanently remove all expired and deleted data
|
||||
* @return void
|
||||
*/
|
||||
public function gc() { }
|
||||
public function gc() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write value for a key into cache
|
||||
|
@ -129,4 +130,5 @@ abstract class CacheEngine {
|
|||
$key = Inflector::underscore(str_replace(array(DS, '/', '.'), '_', strval($key)));
|
||||
return $key;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class ApcEngine extends CacheEngine {
|
|||
} else {
|
||||
$expires = time() + $duration;
|
||||
}
|
||||
apc_store($key.'_expires', $expires, $duration);
|
||||
apc_store($key . '_expires', $expires, $duration);
|
||||
return apc_store($key, $value, $duration);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ class ApcEngine extends CacheEngine {
|
|||
*/
|
||||
public function read($key) {
|
||||
$time = time();
|
||||
$cachetime = intval(apc_fetch($key.'_expires'));
|
||||
$cachetime = intval(apc_fetch($key . '_expires'));
|
||||
if ($cachetime !== 0 && ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ class FileEngine extends CacheEngine {
|
|||
}
|
||||
unset($path);
|
||||
|
||||
if (!$exists && !chmod($this->_File->getPathname(), (int) $this->settings['mask'])) {
|
||||
if (!$exists && !chmod($this->_File->getPathname(), (int)$this->settings['mask'])) {
|
||||
trigger_error(__d(
|
||||
'cake_dev', 'Could not apply permission mask "%s" on cache file "%s"',
|
||||
array($this->_File->getPathname(), $this->settings['mask'])), E_USER_WARNING);
|
||||
|
@ -322,4 +322,5 @@ class FileEngine extends CacheEngine {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -234,4 +234,5 @@ class MemcacheEngine extends CacheEngine {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -173,4 +173,5 @@ class XcacheEngine extends CacheEngine {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue