diff --git a/yii/caching/ApcCache.php b/yii/caching/ApcCache.php index 391851d..ff3acf5 100644 --- a/yii/caching/ApcCache.php +++ b/yii/caching/ApcCache.php @@ -24,7 +24,7 @@ class ApcCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/Cache.php b/yii/caching/Cache.php index ffc7081..efef048 100644 --- a/yii/caching/Cache.php +++ b/yii/caching/Cache.php @@ -247,7 +247,7 @@ abstract class Cache extends Component implements \ArrayAccess * This method should be implemented by child classes to retrieve the data * from specific cache storage. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ abstract protected function getValue($key); diff --git a/yii/caching/DbCache.php b/yii/caching/DbCache.php index dee8c7a..7e5f12d 100644 --- a/yii/caching/DbCache.php +++ b/yii/caching/DbCache.php @@ -92,7 +92,7 @@ class DbCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/DummyCache.php b/yii/caching/DummyCache.php index 359fa7c..8d900df 100644 --- a/yii/caching/DummyCache.php +++ b/yii/caching/DummyCache.php @@ -24,7 +24,7 @@ class DummyCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/FileCache.php b/yii/caching/FileCache.php index cc1a871..0c6d119 100644 --- a/yii/caching/FileCache.php +++ b/yii/caching/FileCache.php @@ -61,7 +61,7 @@ class FileCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/MemCache.php b/yii/caching/MemCache.php index e6b9b53..34c10d0 100644 --- a/yii/caching/MemCache.php +++ b/yii/caching/MemCache.php @@ -7,7 +7,6 @@ namespace yii\caching; -use yii\base\Exception; use yii\base\InvalidConfigException; /** @@ -21,7 +20,7 @@ use yii\base\InvalidConfigException; * MemCache can be configured with a list of memcache servers by settings its [[servers]] property. * By default, MemCache assumes there is a memcache server running on localhost at port 11211. * - * See [[Cache]] for common cache operations that ApcCache supports. + * See [[Cache]] for common cache operations that MemCache supports. * * Note, there is no security measure to protected data in memcache. * All data in memcache can be accessed by any process running in the system. @@ -89,7 +88,7 @@ class MemCache extends Cache if (count($servers)) { foreach ($servers as $server) { if ($server->host === null) { - throw new Exception("The 'host' property must be specified for every memcache server."); + throw new InvalidConfigException("The 'host' property must be specified for every memcache server."); } if ($this->useMemcached) { $cache->addServer($server->host, $server->port, $server->weight); @@ -145,7 +144,7 @@ class MemCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/WinCache.php b/yii/caching/WinCache.php index 4e07c7f..eed580d 100644 --- a/yii/caching/WinCache.php +++ b/yii/caching/WinCache.php @@ -24,7 +24,7 @@ class WinCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/XCache.php b/yii/caching/XCache.php index 2108c4f..91f483b 100644 --- a/yii/caching/XCache.php +++ b/yii/caching/XCache.php @@ -25,7 +25,7 @@ class XCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { diff --git a/yii/caching/ZendDataCache.php b/yii/caching/ZendDataCache.php index 5b41a8d..9ff2fd0 100644 --- a/yii/caching/ZendDataCache.php +++ b/yii/caching/ZendDataCache.php @@ -24,7 +24,7 @@ class ZendDataCache extends Cache * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string $key a unique key identifying the cached value - * @return string the value stored in cache, false if the value is not in the cache or expired. + * @return string|boolean the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) {