Laravel:文件不存在于路径.../cache [英] Laravel: File does not exist at path .../cache

查看:201
本文介绍了Laravel:文件不存在于路径.../cache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完整错误:

Exception has occurred.
Illuminate\Contracts\Filesystem\FileNotFoundException: File does not exist at path D:\Projects\shop\back-end\storage\framework/cache/data/9c/1c/9c1c01dc3ac1445a500251fc34a15d3e75a849df

我尝试了php artisan cache:clear,php artisan config:cache.没有结果.

I tried php artisan cache:clear, php artisan config:cache. No result..

推荐答案

如果使用Cache::has()访问缓存存储,则这是预期的行为.深度Cache::has()会尝试访问预期的位置,如果不存在该位置,则会抛出FileNotFoundException. (源)

If you are accessing your cache store with Cache::has() this is expected behaviour. Deep down Cache::has() will try to access the anticipated location and will throw a FileNotFoundException if the location is not present. (Source)

Illuminate\Cache\FileStore中,此异常被捕获并转换为空的有效负载. (源)

In Illuminate\Cache\FileStore this exception is caught and converted to an empty payload. (Source)

某些调试工具(如XDebug)将在FileNotFoundException上停止运行,您可以将其视为误报.

Some debugging tools, like XDebug, will halt on the FileNotFoundException which you can consider a false positive.

这篇关于Laravel:文件不存在于路径.../cache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆