是否有某种Laravel Controller缓存? [英] Is there some sort of Laravel Controller cache?
问题描述
Laravel 5.5出现奇怪的问题
Weird problem I'm having with Laravel 5.5
我可以更新甚至删除控制器,但看起来好像仍在调用缓存的/旧版本.
I can update and even delete a controller and yet it appears as if a cached / old version is still being called.
我尝试过清除缓存,清除路由缓存,清除配置缓存-似乎没有任何作用.
I've tried clearing cache, clearing route cache, clearing config cache - doesn't seem to have any effect.
在我的本地测试环境中,如果我删除控制器文件然后尝试访问它,我会立即收到未找到的错误.在我的生产服务器上,我没有.
On my local test environment if I delete the controller file then try to access it I immediately get a not found error. On my production server I do not.
有人有什么想法或建议吗?
Anyone have any ideas or advice?
推荐答案
您可以尝试运行:
php artisan clear-compiled
和
composer dump-autoload
和
php artisan route:cache
,如果您正在运行队列:
and if you are running queues:
php artisan queue:restart
还请注意,根据您的 .env
文件中的 APP_ENV
或 APP_DEBUG
,您遇到的错误可能有所不同,但这可能不是情况.
Also be aware the errors you are getting might be different depending on APP_ENV
or APP_DEBUG
in your .env
file but maybe that's not the case.
这篇关于是否有某种Laravel Controller缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!