优化网站缓存;

This commit is contained in:
2022-02-14 22:54:35 +08:00
parent c4ac0764b9
commit 80f5b7cf27
5 changed files with 129 additions and 113 deletions

View File

@@ -1,4 +1,5 @@
<?php
use think\facade\Env;
use think\facade\App;
@@ -56,16 +57,16 @@ return [
'trigger_sql' => true,
// 开启字段缓存
'fields_cache' => true,
],
'sqlite' => [
// 数据库类型
// 数据库类型
'type' => 'sqlite',
// 服务器地址
'hostname' => Env::get('root_path').'ul.db',
'hostname' => Env::get('root_path') . 'ul.db',
// 数据库名
'database' => App::getRootPath().'ul.db',
'database' => App::getRootPath() . 'ul.db',
// 用户名
'username' => Env::get('database.username', ''),
// 密码
@@ -94,6 +95,7 @@ return [
'sql_explain' => false,
// 是否需要断线重连
'break_reconnect' => false,
'fields_cache' => true
],
// 更多的数据库配置信息
],