Tweak doc blocks for Cache::add().

This commit is contained in:
mark_story 2015-08-09 15:21:56 -04:00
parent 41d0e1df19
commit d79855a77a
4 changed files with 4 additions and 3 deletions

View file

@ -595,6 +595,7 @@ class Cache {
* @param mixed $value Data to be cached - anything except a resource. * @param mixed $value Data to be cached - anything except a resource.
* @param string $config Optional string configuration name to write to. Defaults to 'default'. * @param string $config Optional string configuration name to write to. Defaults to 'default'.
* @return bool True if the data was successfully cached, false on failure. * @return bool True if the data was successfully cached, false on failure.
* Or if the key existed already.
*/ */
public static function add($key, $value, $config = 'default') { public static function add($key, $value, $config = 'default') {
$settings = self::settings($config); $settings = self::settings($config);

View file

@ -292,7 +292,7 @@ class MemcacheEngine extends CacheEngine {
/** /**
* Write data for key into cache if it doesn't exist already. When using memcached as your cache engine * Write data for key into cache if it doesn't exist already. When using memcached as your cache engine
* remember that the Memcached pecl extension does not support cache expiry times greater * remember that the Memcached PECL extension does not support cache expiry times greater
* than 30 days in the future. Any duration greater than 30 days will be treated as never expiring. * than 30 days in the future. Any duration greater than 30 days will be treated as never expiring.
* If it already exists, it fails and returns false. * If it already exists, it fails and returns false.
* *

View file

@ -207,7 +207,7 @@ class MemcachedEngine extends CacheEngine {
/** /**
* Write data for key into cache. When using memcached as your cache engine * Write data for key into cache. When using memcached as your cache engine
* remember that the Memcached pecl extension does not support cache expiry times greater * remember that the Memcached PECL extension does not support cache expiry times greater
* than 30 days in the future. Any duration greater than 30 days will be treated as never expiring. * than 30 days in the future. Any duration greater than 30 days will be treated as never expiring.
* *
* @param string $key Identifier for the data * @param string $key Identifier for the data

View file

@ -229,7 +229,7 @@ class RedisEngine extends CacheEngine {
} }
/** /**
* Write data for key into cache if it doesn't exist already. * Write data for key into cache if it doesn't exist already.
* If it already exists, it fails and returns false. * If it already exists, it fails and returns false.
* *
* @param string $key Identifier for the data. * @param string $key Identifier for the data.