From ce168fb3c841d6f92492394cc30d6e0f9ea7952f Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 18 Jan 2013 16:09:29 -0500 Subject: [PATCH] cache cleanup WIP --- framework/caching/Cache.php | 4 +++- framework/caching/Dependency.php | 2 +- framework/logging/Logger.php | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/caching/Cache.php b/framework/caching/Cache.php index ce25a5b..20631a7 100644 --- a/framework/caching/Cache.php +++ b/framework/caching/Cache.php @@ -77,10 +77,12 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess * For example: * * ~~~ - * $key = Cache::buildKey($className, $method, $id); + * $key = $cache->buildKey($className, $method, $id); * ~~~ * + * @param string $id the * @return string the cache key + * @throws InvalidCallException if the method receives no parameter */ public function generateKey($id) { diff --git a/framework/caching/Dependency.php b/framework/caching/Dependency.php index 22d1d3f..2e66145 100644 --- a/framework/caching/Dependency.php +++ b/framework/caching/Dependency.php @@ -42,7 +42,7 @@ abstract class Dependency extends \yii\base\Object */ public function getHasChanged() { - return $this->generateDependencyData() != $this->data; + return $this->generateDependencyData() !== $this->data; } /** diff --git a/framework/logging/Logger.php b/framework/logging/Logger.php index 43ea916..de69f93 100644 --- a/framework/logging/Logger.php +++ b/framework/logging/Logger.php @@ -12,8 +12,8 @@ namespace yii\logging; /** * Logger records logged messages in memory. * - * When [[flushInterval]] is reached or when application terminates, it will - * call [[flush]] to send logged messages to different log targets, such as + * When [[flushInterval()]] is reached or when application terminates, it will + * call [[flush()]] to send logged messages to different log targets, such as * file, email, Web. * * Logger provides a set of events for further customization: