-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
文件缓存问题-隔一段时间会出现一次 #2280
Comments
哪个TP版本? |
我也遇到了这个问题,我用的是文件缓存。 |
@hongweipeng 6.0.1 就是用的文件缓存 |
昨天又出现了 |
我改了框架的代码,暂时解决了。 |
等官方解决方案或者我一会提交个PR |
@hongweipeng 怎么改的 |
public function get($name, $default = null)
{
$this->readTimes++;
$raw = $this->getRaw($name);
if(is_null($raw)) {
return $default;
}
if(is_bool($raw)) {
return $raw === false ? $default : $raw;
}
return $this->unserialize($raw['content']);
} 上面方法应该可以处理这个问题。问题的引起应该是 |
据反馈,有人用 redis驱动也出现了同样的问题,所以不一定是文件缓存驱动的问题。关联issue:top-think/think-cache#6 |
@hongweipeng
|
@phpyii 殊途同归。但也只能算是缓解而已,这个方案会把缓存意外视为不存在,实际上它是存在的= = |
欢迎给出更好的方案哈。 |
隔一段时间会出现一次这个异常
Argument 1 passed to think\cache\Driver::unserialize() must be of the type string, boolean given
The text was updated successfully, but these errors were encountered: