Merge branch 'master' of git.yiisoft.com:yii2

This commit is contained in:
Qiang Xue
2013-05-01 14:18:31 -04:00

View File

@ -70,6 +70,18 @@ abstract class Cache extends Component implements \ArrayAccess
public $serializer;
/**
* Initializes the application component.
* This method overrides the parent implementation by setting default cache key prefix.
*/
public function init()
{
parent::init();
if ($this->keyPrefix === null) {
$this->keyPrefix = \Yii::$app->id;
}
}
/**
* Builds a normalized cache key from a given key.
*