diff --git a/src/config/cache.php b/src/config/cache.php index 7160f1db8..85fe998e6 100644 --- a/src/config/cache.php +++ b/src/config/cache.php @@ -19,7 +19,7 @@ return [ // 缓存前缀 'prefix' => '', // 缓存有效期 0表示永久缓存 - 'expire' => 0, + 'expire' => env('redis.expire', 604800), // 缓存标签前缀 'tag_prefix' => 'tag:', // 序列化机制 例如 ['serialize', 'unserialize'] @@ -33,7 +33,7 @@ return [ 'host' => env('redis.hostport', '127.0.0.1'), // redis密码 'password' => env('redis.password', 'luckyshop123!@#'), - // 缓存有效期 0表示永久缓存 + // 缓存有效期 0表示永久缓存, 604800表示指 7 天 的过期时间 'expire' => env('redis.expire', 604800), ], // 更多的缓存连接