18
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ return [
|
||||
//runtime_path() . '/logs/webman'.ceil(date('H')/6).'.log',
|
||||
runtime_path() . '/logs/webman.log',
|
||||
7, //$maxFiles
|
||||
Monolog\Logger::ALERT,
|
||||
Monolog\Logger::INFO,
|
||||
],
|
||||
'formatter' => [
|
||||
'class' => Monolog\Formatter\LineFormatter::class,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
'enable' => true,
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
\Tinywan\Validate\Facade\Validate::class
|
||||
];
|
||||
Executable → Regular
+15
-9
@@ -1,10 +1,5 @@
|
||||
<?php
|
||||
// 如果ThinkORM需要使用缓存,请取消注释,或者在其他合适的地方引入
|
||||
//\think\facade\Db::setCache(new \Bilulanlv\ThinkCache\CacheManager());
|
||||
\support\think\Db::setCache(new \Bilulanlv\ThinkCache\CacheManager());
|
||||
return [
|
||||
// 开启插件
|
||||
'enable' => true,
|
||||
// 默认缓存驱动
|
||||
'default' => 'redis',
|
||||
// 缓存连接方式配置
|
||||
@@ -15,17 +10,28 @@ return [
|
||||
'type' => 'redis',
|
||||
// 服务器地址
|
||||
'host' => \support\Env::get('redis.host'),
|
||||
// 缓存端口
|
||||
'port' => \support\Env::get('redis.port'),
|
||||
// 缓存密码
|
||||
'password' => \support\Env::get('redis.password',null),
|
||||
'port' => \support\Env::get('redis.port',6379),
|
||||
// 缓存数据库
|
||||
'database' => \support\Env::get('redis.database',0),
|
||||
// 缓存前缀
|
||||
'prefix' => \support\Env::get('redis.prefix','cache:'),
|
||||
'select' => \support\Env::get('redis.database','0'),
|
||||
// 默认缓存有效期 0表示永久缓存
|
||||
'expire' => 0,
|
||||
// Thinkphp官方没有这个参数,由于生成的tag键默认不过期,如果tag键数量很大,避免长时间占用内存,可以设置一个超过其他缓存的过期时间,0为不设置
|
||||
'tag_expire' => 86400 * 7,
|
||||
'tag_expire' => 86400 * 30,
|
||||
// 缓存标签前缀
|
||||
'tag_prefix' => 'tag:',
|
||||
// 连接池配置
|
||||
'pool' => [
|
||||
'max_connections' => 5, // 最大连接数
|
||||
'min_connections' => 1, // 最小连接数
|
||||
'wait_timeout' => 3, // 从连接池获取连接等待超时时间
|
||||
'idle_timeout' => 60, // 连接最大空闲时间,超过该时间会被回收
|
||||
'heartbeat_interval' => 50, // 心跳检测间隔,需要小于60秒
|
||||
],
|
||||
],
|
||||
// 文件缓存
|
||||
'file' => [
|
||||
@@ -35,4 +41,4 @@ return [
|
||||
'path' => runtime_path() . '/file/',
|
||||
],
|
||||
],
|
||||
];
|
||||
];
|
||||
@@ -43,6 +43,7 @@ return [
|
||||
'trigger_sql' => true,
|
||||
'params' => [
|
||||
'persist' => 'mongodb_persist', // 持久化连接标识
|
||||
'authSource' => 'admin',
|
||||
],
|
||||
],
|
||||
'immongodb' => [
|
||||
|
||||
Reference in New Issue
Block a user