ThinkPHP5设置Redis长连接
PHPThinkPHP大约 350 字config.php文件cache中配置'persistent' => true
'cache' => [
// 驱动方式
'type' => 'redis',
'host' => '127.0.0.1',
'port' => '6379',
'password' => '',
'timeout'=> 3600,
//设置长连接
'persistent' => true
// 缓存前缀
//'prefix' => '',
// 缓存有效期 0表示永久缓存
//'expire' => 0,
],
阅读 754 · 发布于 2019-04-08
————        END        ————
扫描下方二维码关注公众号和小程序↓↓↓

昵称: