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

昵称:
随便看看
换一批
-
建站必备网址阅读 2727
-
OpenResty lua-resty-auto-ssl: failed to set ocsp stapling for阅读 1661
-
SpringMVC 请求流程阅读 1135
-
MySQL 查看版本号阅读 1931
-
缓存穿透、缓存雪崩、缓存击穿、缓存污染阅读 1830
-
VisualVM 2.0.6 最大堆内存大小问题阅读 1128
-
Kubernetes Service 对外提供访问阅读 759
-
JavaScript document 对象阅读 406
-
IDEA Debug 时模拟抛出异常阅读 832
-
Kubernetes Pod 控制器 Deployment阅读 576