Skip to content

Commit

Permalink
Fix api doc errors in Cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 1, 2014
1 parent 86a0713 commit 47ce592
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 10 deletions.
3 changes: 2 additions & 1 deletion lib/Cake/Cache/Cache.php
Expand Up @@ -113,11 +113,11 @@ class Cache {
* - `user` Used by Xcache. Username for XCache
* - `password` Used by Xcache/Redis. Password for XCache/Redis
*
* @see app/Config/core.php for configuration settings
* @param string $name Name of the configuration
* @param array $settings Optional associative array of settings passed to the engine
* @return array array(engine, settings) on success, false on failure
* @throws CacheException
* @see app/Config/core.php for configuration settings
*/
public static function config($name = null, $settings = array()) {
if (is_array($name)) {
Expand Down Expand Up @@ -561,6 +561,7 @@ public static function groupConfigs($group = null) {
* the cache key is empty. Can be any callable type supported by your PHP.
* @param string $config The cache configuration to use for this operation.
* Defaults to default.
* @return mixed The results of the callable or unserialized results.
*/
public static function remember($key, $callable, $config = 'default') {
$existing = self::read($key, $config);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/CacheEngine.php
Expand Up @@ -130,7 +130,7 @@ abstract public function clear($check);
* to decide whether actually delete the keys or just simulate it to achieve
* the same result.
*
* @param string $groups name of the group to be cleared
* @param string $group name of the group to be cleared
* @return boolean
*/
public function clearGroup($group) {
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Cache/Engine/ApcEngine.php
Expand Up @@ -173,6 +173,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
9 changes: 5 additions & 4 deletions lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -303,8 +303,8 @@ protected function _clearDirectory($path, $now, $threshold) {
/**
* Not implemented
*
* @param string $key
* @param integer $offset
* @param string $key The key to decrement
* @param integer $offset The number to offset
* @return void
* @throws CacheException
*/
Expand All @@ -315,8 +315,8 @@ public function decrement($key, $offset = 1) {
/**
* Not implemented
*
* @param string $key
* @param integer $offset
* @param string $key The key to decrement
* @param integer $offset The number to offset
* @return void
* @throws CacheException
*/
Expand Down Expand Up @@ -405,6 +405,7 @@ public function key($key) {
/**
* Recursively deletes all files under any directory named as $group
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Cache/Engine/MemcacheEngine.php
Expand Up @@ -199,7 +199,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -282,6 +283,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
5 changes: 4 additions & 1 deletion lib/Cake/Cache/Engine/MemcachedEngine.php
Expand Up @@ -136,6 +136,7 @@ public function init($settings = array()) {
* Settings the memcached instance
*
* @throws CacheException when the Memcached extension is not built with the desired serializer engine
* @return void
*/
protected function _setOptions() {
$this->_Memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
Expand Down Expand Up @@ -257,7 +258,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -314,6 +316,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Cache/Engine/RedisEngine.php
Expand Up @@ -175,7 +175,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check Whether or not expiration keys should be checked. If
* true, no keys will be removed as cache will rely on redis TTL's.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -212,6 +213,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group name to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Cache/Engine/WincacheEngine.php
Expand Up @@ -179,6 +179,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Cache/Engine/XcacheEngine.php
Expand Up @@ -126,7 +126,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -163,6 +164,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down

0 comments on commit 47ce592

Please sign in to comment.