Answer the question
In order to leave comments, you need to log in
How to enable rbac caching?
I tried to use this example https://habrahabr.ru/post/251847/ rbac caching
But I got it after this common/config/main.php code
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'cacheRbac' => [
'class' => 'yii\caching\ApcCache',
]
],
return => [
'components' => [
'authManager' => [
'class' => 'yii\rbac\DbManager',
'cache' => 'cacheRbac',
],
}
]
Answer the question
In order to leave comments, you need to log in
1. Here is Apc installation guide: sitear.ru/material/apc-php
2. It is not necessary to use apc for rbac, it will work with other types of cache. Choose:
More details here: www.yiiframework.com/doc-2.0/guide-caching-data.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question