feat: 将用户登录信息与普通缓存数据区分存储

This commit is contained in:
augushong
2025-04-22 09:03:51 +08:00
parent c1042ce1c6
commit a078c14af7
3 changed files with 16 additions and 9 deletions

View File

@@ -1,4 +1,6 @@
<?php
use think\facade\App;
use think\facade\Env;
// +----------------------------------------------------------------------
@@ -10,20 +12,25 @@ return [
'default' => Env::get('cache.driver', 'file'),
// 缓存连接方式配置
'stores' => [
'stores' => [
'file' => [
// 驱动方式
'type' => 'File',
'type' => 'File',
// 缓存保存目录
'path' => '',
'path' => '',
// 缓存前缀
'prefix' => '',
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
'expire' => 0,
// 缓存标签前缀
'tag_prefix' => 'tag:',
// 序列化机制 例如 ['serialize', 'unserialize']
'serialize' => [],
'serialize' => [],
],
'login' => [
'type' => 'File',
// 缓存保存目录
'path' => App::getRuntimePath() . 'login/',
],
// 更多的缓存连接
],