Browse Source

Fix api doc errors in Cache.

mark_story 11 years ago
parent
commit
47ce5928e1

+ 2 - 1
lib/Cake/Cache/Cache.php

@@ -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)) {
@@ -561,6 +561,7 @@ class Cache {
  *   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);

+ 1 - 1
lib/Cake/Cache/CacheEngine.php

@@ -130,7 +130,7 @@ abstract class CacheEngine {
  * 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) {

+ 1 - 0
lib/Cake/Cache/Engine/ApcEngine.php

@@ -173,6 +173,7 @@ class ApcEngine extends CacheEngine {
  * 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) {

+ 5 - 4
lib/Cake/Cache/Engine/FileEngine.php

@@ -303,8 +303,8 @@ class FileEngine extends CacheEngine {
 /**
  * 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
  */
@@ -315,8 +315,8 @@ class FileEngine extends CacheEngine {
 /**
  * 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
  */
@@ -405,6 +405,7 @@ class FileEngine extends CacheEngine {
 /**
  * Recursively deletes all files under any directory named as $group
  *
+ * @param string $group The group to clear.
  * @return boolean success
  */
 	public function clearGroup($group) {

+ 3 - 1
lib/Cake/Cache/Engine/MemcacheEngine.php

@@ -199,7 +199,8 @@ class MemcacheEngine extends CacheEngine {
 /**
  * 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) {
@@ -282,6 +283,7 @@ class MemcacheEngine extends CacheEngine {
  * 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) {

+ 4 - 1
lib/Cake/Cache/Engine/MemcachedEngine.php

@@ -136,6 +136,7 @@ class MemcachedEngine extends CacheEngine {
  * 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);
@@ -257,7 +258,8 @@ class MemcachedEngine extends CacheEngine {
 /**
  * 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) {
@@ -314,6 +316,7 @@ class MemcachedEngine extends CacheEngine {
  * 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) {

+ 3 - 1
lib/Cake/Cache/Engine/RedisEngine.php

@@ -175,7 +175,8 @@ class RedisEngine extends CacheEngine {
 /**
  * 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) {
@@ -212,6 +213,7 @@ class RedisEngine extends CacheEngine {
  * 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) {

+ 1 - 0
lib/Cake/Cache/Engine/WincacheEngine.php

@@ -179,6 +179,7 @@ class WincacheEngine extends CacheEngine {
  * 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) {

+ 3 - 1
lib/Cake/Cache/Engine/XcacheEngine.php

@@ -126,7 +126,8 @@ class XcacheEngine extends CacheEngine {
 /**
  * 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) {
@@ -163,6 +164,7 @@ class XcacheEngine extends CacheEngine {
  * 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) {