Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bonzo's avatar
Level 14

Apache serves old cached files

Since a couple of days my server does a strange thing. After deploying a new version of the site, he serves the old page until I restart him. I have js-versioning enabled and noticed this behavior in the Developer Tools as he wanted to load the previous version of a script. It's probably a memcache or apc thing, but the server worked fine until a few days ago. I wouldn't want to deactivate the cache, so did anyone had the same problem and can point me in the right direction ?

0 likes
3 replies
willvincent's avatar
Level 54

Definitely a caching issue. Just flush the cache if/when you do a new deploy. Consider that part of your deployment process.. which ideally shouldn't be happening on a very frequent basis anyway.

1 like
bonzo's avatar
Level 14

Yeah, forgot to say a did the cache clearing on laravel-side with php artisan with clear-compiled, optimize, views:clear and chache:clear. Is there anything else?

vladimir's avatar

Same thing is happening to me right now, suddenly, no new changes are visible. I did view: vagrant@homestead:~/Code/VladimirNikolic$ php artisan cache:clear Cache cleared successfully. vagrant@homestead:~/Code/VladimirNikolic$ php artisan view:clear Compiled views cleared! vagrant@homestead:~/Code/VladimirNikolic$ php artisan clear-compiled The compiled class file has been removed.

Restarted computer, restarted Homestead, emptying cache from Browser, opened page in incognito window, opened page in new browser never visited page and still, old page is there.

Please or to participate in this conversation.