Skip to content
Permalink
Browse files

Fix coding standards in Cache/

  • Loading branch information...
markstory committed Mar 3, 2012
1 parent 9d325fe commit 04c843b17bffd5c0e6a55881491503578f0a8cd5
@@ -477,5 +477,6 @@ public static function settings($name = 'default') {
}
return array();
}
}
@@ -53,7 +53,8 @@ public function init($settings = array()) {
* 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 @@ public function key($key) {
$key = Inflector::underscore(str_replace(array(DS, '/', '.'), '_', strval($key)));
return $key;
}
}
@@ -54,7 +54,7 @@ public function write($key, $value, $duration) {
} 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 @@ public function write($key, $value, $duration) {
*/
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 @@ protected function _setKey($key, $createKey = false) {
}
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 @@ protected function _active() {
}
return true;
}
}
@@ -234,4 +234,5 @@ public function connect($host, $port = 11211) {
}
return true;
}
}
@@ -173,4 +173,5 @@ protected function _auth($reverse = false) {
}
}
}
}

0 comments on commit 04c843b

Please sign in to comment.
You can’t perform that action at this time.