mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 13:58:55 +08:00
Merge branch 'master' of git.yiisoft.com:yii2
This commit is contained in:
@ -70,6 +70,18 @@ abstract class Cache extends Component implements \ArrayAccess
|
|||||||
public $serializer;
|
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.
|
* Builds a normalized cache key from a given key.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user