ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
首先确认服务器已经安装redis服务,php安装了redis扩展. 因为我们在laravel的项目中需要下载laravel的redis扩展 ``` composer require predis/predis ``` 1.修改config/cache.php(我们也可以谢盖env文件将 CACHE_DRIVER=redis) ![](https://box.kancloud.cn/c3bd126b4e441aaf4ad14a2bba84186e_1010x91.png) ``` //'redis' => [ // 'driver' => 'redis', // 'connection' => 'cache', //], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', 'options' => [ 'cluster' => 'redis', ], ], ``` ![](https://box.kancloud.cn/7b24d985955f0c388e9cacd2970096e3_1307x491.png)