schema cache这个在生产环境中需要配置缓存
在db.php 中配置:return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1;dbname=jeulia_erp2', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'enableSchemaCache' => true, // Duration of schema cache. 'schemaCacheDuration' => 3600, // Name of the cache component used to store schema information 'schemaCache' => 'cache', ];
RBAC DbManger 缓存
启用DbManger后,系统会更具权限复杂度的不同产生非常多的查询,这个时候可以根据需要在配置文件中添加权限缓存可以很好的减少这些查询请求'authManager' => [ 'class' => 'yii\rbac\DbManager', 'cache' => 'cache' ],
Yii2 使用基本配置
最新推荐文章于 2024-11-25 16:28:08 发布