DWilliams Posted June 5, 2010 Share Posted June 5, 2010 At least, I assume that's what it's doing. I have a CLI script that reads in a bunch of PHP files every time it starts and stores their contents in a big array to be called with eval() later. I have two bits of evidence to suggest PHP caches these files in-between executions: 1. If my script hasn't been run for several hours, it takes a fair amount of time to start up. This is to be expected since it has quite a bit of work to do to load in all these files. If I run my script, exit it completely, and run it again within a short period of time, it starts up and loads all files instantly. 2. If the PHP script in one of these files contains an error and is read in, changing it does not correct the problem. I've commented the problem line out, fixed it, and even completely removed it from the file but when my main script is loaded again it will still generate an error based on what was previously in the file. So, how can I force PHP to always read directly from disk and not use whatever caching mechanism it's using? I'd prefer some way to do it within my script instead of a config file if possible. Link to comment https://forums.phpfreaks.com/topic/203978-how-can-i-make-php-stop-caching-my-files/ Share on other sites More sharing options...
Mchl Posted June 5, 2010 Share Posted June 5, 2010 Default PHP version does not have any such mechanism in place. It's either something in your script, or some custom extension to PHP. Link to comment https://forums.phpfreaks.com/topic/203978-how-can-i-make-php-stop-caching-my-files/#findComment-1068389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.