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

stueynet's avatar

Laravel elixir file_get_contents cache?

When Elixir does file_get_contents to parse the rev-manifest.json file, does that data get cached somewhere? We are having issues with our deployments. When we deploy we sort of do what Envoyer does whereby we create a new release in a releases folder, do the deployment of the code, and then when its complete we re-point our nginx set folder to the new timestamped release folder.

The strange thing is that for a while after this process, somehow our files are still looking for the old revisioned js and css files from the previous rev-manifest.json file, even though the current web folder is the new release folder. So the data from rev-manifest.json is being cached somewhere.

We have tried clearing all know caches which to my under standing are /storage/framework/cache and /storage/framework/views. We also run php artisan cache:clear, php artisan view:clear, php artisan optimize, composer dump-autoload. Yet for up to an hour the site still tries to use the old css and js files which do not exist in the newly made release folder and thus throw a 404.

Interested to see if anyone has any thoughts. Are there other caches I don't know about?

0 likes
8 replies
willvincent's avatar

Are you sure it's not a client-side browser cache issue?

willvincent's avatar

Any load balancers or http cache server (varnish, etc) in your webstack?

stueynet's avatar

Nope. Though we are looking further into that. Our server people say its a Laravel thing. Honestly I am not sure at this point.

bashy's avatar

So you confirmed these two things?

  1. Confirmed the new rev-manifest.json is correct when doing cat public/build/rev-manifest.json.
  2. Confirmed the files in /public/build have updated to link up to the rev-manifest.json file.

I've never seen that issue where it's been cached. I've pulled new code and it's worked straight away.

The only thing I know which is cached PHP side is symlinks. This means that real paths (release folder) are cached by the system and will return the old one until it's updated. Have a check by modifying the old rev-manifest.json when looking at the source for it on your domain (domain.tld/build/rev-manifest.json).

stueynet's avatar

I think symlinks is the issue. I am going to go deep down that path and let you know what I find out.

Please or to participate in this conversation.