Commit ce168fb3 by Qiang Xue

cache cleanup WIP

parent c1328b66
...@@ -77,10 +77,12 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess ...@@ -77,10 +77,12 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess
* For example: * For example:
* *
* ~~~ * ~~~
* $key = Cache::buildKey($className, $method, $id); * $key = $cache->buildKey($className, $method, $id);
* ~~~ * ~~~
* *
* @param string $id the
* @return string the cache key * @return string the cache key
* @throws InvalidCallException if the method receives no parameter
*/ */
public function generateKey($id) public function generateKey($id)
{ {
......
...@@ -42,7 +42,7 @@ abstract class Dependency extends \yii\base\Object ...@@ -42,7 +42,7 @@ abstract class Dependency extends \yii\base\Object
*/ */
public function getHasChanged() public function getHasChanged()
{ {
return $this->generateDependencyData() != $this->data; return $this->generateDependencyData() !== $this->data;
} }
/** /**
......
...@@ -12,8 +12,8 @@ namespace yii\logging; ...@@ -12,8 +12,8 @@ namespace yii\logging;
/** /**
* Logger records logged messages in memory. * Logger records logged messages in memory.
* *
* When [[flushInterval]] is reached or when application terminates, it will * When [[flushInterval()]] is reached or when application terminates, it will
* call [[flush]] to send logged messages to different log targets, such as * call [[flush()]] to send logged messages to different log targets, such as
* file, email, Web. * file, email, Web.
* *
* Logger provides a set of events for further customization: * Logger provides a set of events for further customization:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment