Answer the question
In order to leave comments, you need to log in
How to properly use cache in yii2?
I have a cache for authManager in my settings. In theory, everything is cached now. But confuses the number of requests to the database anyway.
Here's what's in the config now
'authManager' => [
'class' => 'yii\rbac\DbManager',
'cache' => 'cache',
'cacheKey' => '****',
],
'db' => [
'class' => 'yii\db\Connection',
'enableSchemaCache' => true,
'dsn' => 'mysql:host=localhost;dbname=***',
'username' => '***',
'password' => '***',
'charset' => 'utf8',
],
'cache' => [
'class' => 'yii\caching\DbCache',
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question