From 7dc9ef8b70d99bd7399aca4cc9b8b2cbd8948b64 Mon Sep 17 00:00:00 2001 From: zhaoxiang Date: Sat, 10 Oct 2020 16:25:37 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E6=B7=BB=E5=8A=A0redis=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/cache.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/config/cache.php b/config/cache.php index a8d69d2..9d98aba 100644 --- a/config/cache.php +++ b/config/cache.php @@ -6,7 +6,7 @@ return [ // 默认缓存驱动 - 'default' => env('cache.driver', 'file'), + 'default' => env('cache.driver', 'redis'), // 缓存连接方式配置 'stores' => [ @@ -22,8 +22,18 @@ return [ // 缓存标签前缀 'tag_prefix' => 'tag:', // 序列化机制 例如 ['serialize', 'unserialize'] - 'serialize' => [], + 'serialize' => [] ], + 'redis' => [ + // 驱动方式 + 'type' => 'Redis', + 'host' => '127.0.0.1', + 'port' => 6379, + 'password' => '', + 'select' => 0, + 'prefix' => '', + 'serialize' => [] + ] // 更多的缓存连接 ], ];