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,
],
阅读 2656 · 发布于 2019-04-08
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Java 按字典顺序排序请求参数阅读 3488
-
k3s Helm Error INSTALLATION FAILED Kubernetes cluster unreachable阅读 330
-
Windows 安装包管理器 choco阅读 171
-
Docker Dockerfile 关键字阅读 288
-
OpenResty 使用 ngx.timer.every 完成定时任务阅读 4292
-
PHP 判断函数、类、方法、属性、数组中的 key 是否存在阅读 2585
-
Linux CentOS 安装 MySQL5.7阅读 2733
-
GoJS 自定义圆角矩形阅读 602
-
GitHub OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443阅读 3386
-
通过 Windows 远程桌面修改远程电脑密码阅读 142