We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
缓存(Cache)
6.0
Ubuntu
cache.php配置如下
return [ 'default' => 'redis', 'stores' => [ // 文件缓存 'file' => [ // 驱动方式 'type' => 'file', // 设置不同的缓存保存目录 'path' => '../runtime/file/', ], // redis缓存 'redis' => [ // 驱动方式 'type' => 'redis', // 服务器地址 'host' => 'xxx', 'port' => '6379', 'password' => '', 'select' => 1, 'persistent' => true, 'prefix' => '', 'serialize' => true, ], 'test00' => [ 'type' => 'redis', 'host' => 'xxx', 'port' => 6379, 'password' => '', 'select' => 0, 'timeout' => 0, 'expire' => 0, 'persistent' => true, 'prefix' => '', 'serialize' => true, ] ], ];
控制器代码如下:
public function test() { \think\facade\Cache::store('test00')->set('test00', 'test00'); return 'success'; }
执行控制器代码,此时test00这个key写在了1号库没有按照配置写入0号库 另外修改配置,将persistent都改成false这时候正常写入,又或者将源码中的if判断注释,强制进行select,,则能正常读写
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
所属功能组件
缓存(Cache)
ThinkPHP 版本
6.0
操作系统
Ubuntu
错误信息
cache.php配置如下
控制器代码如下:
执行控制器代码,此时test00这个key写在了1号库没有按照配置写入0号库
另外修改配置,将persistent都改成false这时候正常写入,又或者将源码中的if判断注释,强制进行select,,则能正常读写
其它说明
No response
The text was updated successfully, but these errors were encountered: