John Davidson

php - does Laravel cache file code or does the server do it?

0 comments
Message:


I have a log inside one of Laravel Jobs that I've already removed a few days ago. Today I checked and the log is still showing even though it's no longer in the code. I checked manually and it is indeed gone from the server file. So I'm wondering why this is happening and does this mean every time I do an update I have to do the ff:


php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear

Is Laravel doing this or could be a server cache?


If it is server cache where can I find the config for it?


We're using Ubuntu 20.04.5 LTS and nginx


PHP v8.0


Laravel v9.37.0



My Answer:
Laravel does not cache file code by default. It is possible that the log is still showing due to server-side caching.

If you suspect that server caching is causing the issue, you can check the configuration files for your server cache. In the case of Ubuntu 20.04 LTS with nginx, you may want to check the nginx configuration files for any caching directives that could be causing the issue.

In general, when you make changes to your Laravel application, it is a good practice to clear the cache using the commands you mentioned (php artisan cache:clear, php artisan config:clear, php artisan route:clear, php artisan view:clear) to ensure that any cached data is refreshed. This helps to avoid issues like the one you are experiencing with the lingering log.

Rate this post

3 of 5 based on 7907 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us