perf: redis env配置

This commit is contained in:
2025-07-09 16:14:06 +08:00
parent f778998fb9
commit b56f6f5cbb
2 changed files with 10 additions and 4 deletions

View File

@@ -14,6 +14,12 @@ DEFAULT_LANG = zh-cn
# 前端代理服务器ip影响使用代理访问情况下的客户端ip获取
PROXY_SERVER_IP[] = 120.79.27.160
# redis 配置
REDIS_HOST = 127.0.0.1
REDIS_PORT = 6379
REDIS_PASSWORD = ''
REDIS_PREFIX = ow:
[JWT]
TTL=3600
REFRESH_TTL=20160

View File

@@ -29,15 +29,15 @@ return [
// 驱动方式
'type' => 'redis',
// 服务器地址
'host' => '127.0.0.1',
'host' => env('REDIS_HOST', '127.0.0.1'),
// 端口
'port' => 6379,
'port' => env('REDIS_PORT', 6379),
// 密码
'password' => 'orico@f2b211',
'password' => env('REDIS_PASSWORD', 'orico@f2b211'),
// 缓存有效期 0表示永久缓存
'expire' => 0,
// 缓存前缀
'prefix' => 'ow:',
'prefix' => env('REDIS_PREFIX', 'ow:'),
]
],
];