Laravel:文件在路径.../缓存中不存在

标签 laravel caching

完整错误:

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。没有结果..

最佳答案

如果您使用 Cache::has() 访问缓存存储这是预期的行为。内心深处 Cache::has()将尝试访问预期位置并抛出 FileNotFoundException如果该位置不存在。 (Source)

Illuminate\Cache\FileStore此异常被捕获并转换为空负载。 (Source)

一些调试工具,如 XDebug,将在 FileNotFoundException 上停止。您可以将其视为误报。

关于Laravel:文件在路径.../缓存中不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51255035/

相关文章:

caching - 如何在 perfoce 代理服务器上预缓存文件以获得不错的速度?

caching - 当我使用略多于 64kb 的常量缓存时,为什么我的内核不会失败? (OpenCL/CUDA)

mysql - MySQL查询缓存

mysql - 动态行未使用 Laravel Controller 保存在数据库中

Laravel 安装程序继续安装 5.5 而不是 5.6

php artisan 服务无法工作,在 ProviderRepository.php 行 208 :Class 'Laravelium\Sitemap\SitemapServiceProvider' not found 中给出错误

php - 如何在 Laravel 中构建查询

jsp - Tomcat 7 不同的行为

mysql - 需要帮助将嵌套连接查询转换为 Laravel Eloquent

tomcat - mod_cache 返回 "broken expires header"