thinkphp5 redis缓存设置

安装

cd lnmp1.4

./addone.sh

redis

 

'cache'                  => [
        // 驱动方式
        'type'       => 'redis',
        // 缓存前缀
        'prefix'     => '',
        // 缓存有效期 0表示永久缓存
        'expire'     => 0,

        'host'       => '127.0.0.1',
        'port'       => 6379,
        'password'   => '您的密码',
        'select'     => 0,
        'timeout'    => 0,
        'persistent' => false,
    ],

  

记得防火墙里允许6379端口

posted @ 2017-06-18 06:57  lobtao  阅读(762)  评论(0)    收藏  举报