From a2b946e4d3acc7c37a8e3f91f7a1405be24a1073 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 13 Sep 2013 00:49:06 +0400 Subject: [PATCH] Zend Data Cache returns null when record doesn't exist (reverted from commit 590121c4ff76b548b2bdb74f72ce247a806af415) --- framework/yii/caching/ZendDataCache.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/framework/yii/caching/ZendDataCache.php b/framework/yii/caching/ZendDataCache.php index 7e040f0..9ff2fd0 100644 --- a/framework/yii/caching/ZendDataCache.php +++ b/framework/yii/caching/ZendDataCache.php @@ -21,25 +21,6 @@ namespace yii\caching; class ZendDataCache extends Cache { /** - * Checks whether a specified key exists in the cache. - * This can be faster than getting the value from the cache if the data is big. - * In case a cache does not support this feature natively, this method will try to simulate it - * but has no performance improvement over getting it. - * Note that this method does not check whether the dependency associated - * with the cached data, if there is any, has changed. So a call to [[get]] - * may return false while exists returns true. - * @param mixed $key a key identifying the cached value. This can be a simple string or - * a complex data structure consisting of factors representing the key. - * @return boolean true if a value exists in cache, false if the value is not in the cache or expired. - */ - public function exists($key) - { - $key = $this->buildKey($key); - $value = $this->getValue($key); - return $value !== null; - } - - /** * 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