Fix coding standards in Cache/

This commit is contained in:
mark_story 2012-03-03 17:34:13 -05:00
parent 9d325fe46e
commit 04c843b17b
6 changed files with 10 additions and 4 deletions

View file

@ -477,5 +477,6 @@ class Cache {
}
return array();
}
}

View file

@ -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;
}
}

View file

@ -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;
}

View file

@ -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;
}
}

View file

@ -234,4 +234,5 @@ class MemcacheEngine extends CacheEngine {
}
return true;
}
}

View file

@ -173,4 +173,5 @@ class XcacheEngine extends CacheEngine {
}
}
}
}