phemellc / yii2-settings

Yii2 Settings Module
Other
151 stars 74 forks source link

Yii::$app->settings->clearCache() does not clear the cache for the front-end when you add a new setting #1

Closed aetiv closed 9 years ago

aetiv commented 9 years ago

You clean the cache in actions(update, create, delete) but Yii::$app - is backend application. Need to clear and for front-end

arisk commented 9 years ago

I think the best way to support this is the configure the front end cache component in the backend app. If you're using file cache your configuration would look something like this:

'components' => [
    'frontCache' => [
        'class' => 'yii\caching\FileCache',
        'cachePath' => '/path/to/frontend/runtime/cache'
    ],
],

Does this satisfy your requirement?

aetiv commented 9 years ago

Yes, thank you very much.