企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
数据库配置文件位于 System 应用下的 Config 文件夹 /app/System/Config/Cache.php ~~~ <?php namespace App\System\Config; class Cache { public $driver = 'File'; // 缓存类型 File:文件/Memcache/Memcached/Redis // memcache 配置项,二维数组,可存放多个服务器配置 /* public $memcache = array( array( 'host' => '127.0.0.1', // 主机名 'port' => '11211', // 端口号 'timeout' => 0, // 超时时间 'persistent' => false, // 是否使用长连接 'weight' => 1 // 权重 ) ); */ // memcached 配置项,二维数组,可存放多个服务器配置 /* public $memcached = array( array( 'host' => '127.0.0.1', // 主机名 'port' => '11211', // 端口号 'weight' => 1 // 权重 ) ); */ // REDIS 设置项,未设置时使用系统 REDIS 设置 /*public $redis = array( 'host' => '127.0.0.1', // 主机名 'port' => 6379, // 端口号 'timeout' => 10, // 超时时间 'persistent' => false, // 是否使用长连接 'password' => '', // 密码,不需要时留空 'db'=> 0 // 默认选中数据库 );*/ } ~~~ ### driver 驱动,配置缓存驱动类型,默认为文件缓存,存放位置: /cache/File 目录 当驱动类型为 Memcache/Memcached/Redis 时,需要取消对应配置项注释,并配置相关参数