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?
Laravel supports popular caching backends like Memcached, Redis, DynamoDB, and relational databases out of the box. In addition, a file based cache driver is available, while array and "null" cache drivers provide convenient cache backends for your automated tests.
When a request is executed that renders a view, Laravel will compile the view if a pre-compiled view does not already exist (or if the view has been modified more recently than the compiled view). View caching pre-compiles all of the views utilized by your application.
Laravel provides a unified API for various caching systems. The cache configuration is located at app/config/cache. php . In this file you may specify which cache driver you would like used by default throughout your application.
Laravel creates an encrypted file with the data and the cache key when new data is cached. The same happens when the user is trying to retrieve the content. Laravel cache searches through the folder for the specified key and, if found, returns the content.
I had the same problem. As for me, the reason was in composer classLoader.
composer clear-cache
composer dump-autoload
You can try running:
php artisan clear-compiled
and
composer dump-autoload
and
php artisan route:cache
and if you are running queues:
php artisan queue:restart
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With