Commit 0013b608 by Qiang Xue

Fixes #2734: `FileCache::keyPrefix` defaults to empty string now

parent 2e07ca52
...@@ -204,6 +204,7 @@ Yii Framework 2 Change Log ...@@ -204,6 +204,7 @@ Yii Framework 2 Change Log
- Removed `yii\web\Controller::createUrl` and `yii\web\Controller::createAbsoluteUrl`, use `yii\helpers\Url::toRoute` instead. - Removed `yii\web\Controller::createUrl` and `yii\web\Controller::createAbsoluteUrl`, use `yii\helpers\Url::toRoute` instead.
- Removed `yii\web\Controller::getCanonicalUrl`, use `yii\helpers\Url::canonical` instead. - Removed `yii\web\Controller::getCanonicalUrl`, use `yii\helpers\Url::canonical` instead.
- Chg #2691: Null parameters will not be included in the generated URLs by `UrlManager` (gonimar, qiangxue) - Chg #2691: Null parameters will not be included in the generated URLs by `UrlManager` (gonimar, qiangxue)
- Chg #2734: `FileCache::keyPrefix` defaults to empty string now (qiangxue)
- Chg: Renamed `yii\jui\Widget::clientEventsMap` to `clientEventMap` (qiangxue) - Chg: Renamed `yii\jui\Widget::clientEventsMap` to `clientEventMap` (qiangxue)
- Chg: Renamed `ActiveRecord::getPopulatedRelations()` to `getRelatedRecords()` (qiangxue) - Chg: Renamed `ActiveRecord::getPopulatedRelations()` to `getRelatedRecords()` (qiangxue)
- Chg: Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator` (qiangxue) - Chg: Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator` (qiangxue)
......
...@@ -25,6 +25,14 @@ use yii\helpers\FileHelper; ...@@ -25,6 +25,14 @@ use yii\helpers\FileHelper;
class FileCache extends Cache class FileCache extends Cache
{ {
/** /**
* @var string a string prefixed to every cache key. This is needed when you store
* cache data under the same [[cachePath]] for different applications to avoid
* conflict.
*
* To ensure interoperability, only alphanumeric characters should be used.
*/
public $keyPrefix = '';
/**
* @var string the directory to store cache files. You may use path alias here. * @var string the directory to store cache files. You may use path alias here.
* If not set, it will use the "cache" subdirectory under the application runtime path. * If not set, it will use the "cache" subdirectory under the application runtime path.
*/ */
......
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