diff --git a/application/config.php b/application/config.php index 1799162..e6cb451 100755 --- a/application/config.php +++ b/application/config.php @@ -187,13 +187,24 @@ return [ // +---------------------------------------------------------------------- 'cache' => [ // 驱动方式 - 'type' => 'File', +// 'type' => 'file', // 缓存保存目录 'path' => CACHE_PATH, // 缓存前缀 'prefix' => '', // 缓存有效期 0表示永久缓存 'expire' => 0, + + 'type' => 'redis', +// 'redis' => [ + 'host' => Env::get('redis.redis_host'), // Redis 服务器地址 + 'port' => Env::get('redis.redis_port'), // Redis 端口 + 'password' => Env::get('redis.redis_password'), // Redis 密码,如果有的话 + 'select' => Env::get('redis.redis_db'), // 默认数据库(0-15) + 'timeout' => 0, // Redis 连接超时 +// 'prefix' => '', // 缓存前缀 +// 'expire' => 3600, // 默认缓存过期时间(秒) +// ], ], // +---------------------------------------------------------------------- // | 会话设置 @@ -205,10 +216,20 @@ return [ // SESSION 前缀 'prefix' => 'think', // 驱动方式 支持redis memcache memcached - 'type' => '', +// 'type' => 'redis', // 是否自动开启 SESSION 'auto_start' => true, - //'cache_limiter'=>'' + + 'type' => 'redis', +// 'redis' => [ + 'host' => Env::get('redis.redis_host'), // Redis 服务器地址 + 'port' => Env::get('redis.redis_port'), // Redis 端口 + 'password' => Env::get('redis.redis_password'), // Redis 密码,如果有的话 + 'select' => Env::get('redis.redis_db'), + 'timeout' => 0, // Redis 连接超时 + + 'expire' => 3600, // 默认缓存过期时间(秒) +// ], ], // +---------------------------------------------------------------------- // | Cookie设置