1、\thinkphp\library\think\cache\driver 找到 redis.php,打开并且根据自己情况修改里面的配置
protected $options = [
'host' => '127.0.0.1',
'port' => 6379,
'password' => '12345678',
'select' => 0,
'timeout' => 0,
'expire' => 0,
'persistent' => false,
'prefix' => '',
];
2、\application\config.php,打开并且修改cache驱动方式
'cache' => [
// 驱动方式
'type' => 'redis',
// 缓存保存目录
'path' => CACHE_PATH,
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
],
3、\thinkphp\