Cached DBManager for yii2 RBAC
Allows caching of permissions in yii\rbac\DbManager, (*1)
WARNING Yii2 now supports native cache for yii\rbac\DbManager. See https://github.com/yiisoft/yii2/issues/3168, (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist bethrezen/yii2-cached-rbac-dbmanager "*"
or add, (*5)
"bethrezen/yii2-cached-rbac-dbmanager": "*"
to the require section of your composer.json
file., (*6)
Usage
Once the extension is installed, simply configure your application to use \bethrezen\CachedDbManager
:, (*7)
'components' => [
// the rest of your components section
'authManager' => [
'class'=>'\bethrezen\CachedDbManager',
],
]