无限星辰工作室-客户无限互联网动力之源

标题: Thinkphp 5 Redis config配置 [打印本页]

作者: crx349    时间: 2018-11-25 11:47
标题: Thinkphp 5 Redis config配置

  1.   // +----------------------------------------------------------------------
  2.   // | 缓存设置
  3.   // +----------------------------------------------------------------------

  4.     'cache'                  => [
  5.       // 驱动方式
  6.         'type'   => 'Redis',
  7.       // 缓存保存目录
  8.         'path'   => CACHE_PATH,
  9.       // 缓存前缀
  10.         'prefix' => '',
  11.       // 缓存有效期 0表示永久缓存
  12.         'expire' => 0,
  13.                 'host'   => '127.0.0.1',
  14.         'port'   => '6379',
  15.         'password' => '',
  16.         'timeout'=> 3600,
  17.     ],
  18.   // +----------------------------------------------------------------------
  19.   // | 会话设置
  20.   // +----------------------------------------------------------------------

  21.     'session'                => [
  22.         'id'             => '',
  23.       // SESSION_ID的提交变量,解决flash上传跨域
  24.         'var_session_id' => '',
  25.       // SESSION 前缀
  26.         'prefix'         => 'think',
  27.       // 驱动方式 支持redis memcache memcached
  28.         'type'           => 'redis',
  29.       // 是否自动开启 SESSION
  30.         'auto_start'     => true,
  31.                 'host'           =>'127.0.0.1',
  32.         'port'           =>'6379',
  33.     ],
复制代码









欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4