ThinkPHP5 设置 Redis 长连接

PHP ThinkPHP Redis About 356 words

修改配置

config.php文件cache中配置'persistent' => true

'cache'                  => [
    // 驱动方式
    'type'   => 'redis',
    'host'   => '127.0.0.1',
    'port'   => '6379',
    'password' => '',
    'timeout'=> 3600,
    //设置长连接
    'persistent' => true
    // 缓存前缀
    //'prefix' => '',
    // 缓存有效期 0表示永久缓存
    //'expire' => 0,
],
Views: 5,396 · Posted: 2019-04-08

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh