Laravel 缓存:清除损坏的应用程序

时间:2021-01-26 12:30:12

标签: php laravel

执行后

php artisan config:cache
php artisan cache:clear

应用程序不再工作,似乎是关于 session 的问题。已停止创建会话文件。

返回的错误是:

file_put_contents(path/to/file/storage/framework/sessions/PullrofroFB2gGJNA8v7Zo7OcdTzno4ZDTVmfBBi): 
failed to open stream: 
No such file or directory

1 个答案:

答案 0 :(得分:0)

config:cachecache:clear 不是指同一个缓存。

如果您运行 php artisan config:cache --help 会显示以下说明:

<块引用>

说明:创建缓存文件以加快配置加载

运行 php artisan cache:clear --help 显示以下说明:

<块引用>

说明:刷新应用缓存

还有另一个命令:config:clear which

<块引用>

说明:删除配置缓存文件

所以... cache:clear 只清除应用程序缓存,而 config:clear 将删除由 config:cache 创建的缓存文件。您也可以尝试以管理员权限运行 config:cache