I have a script that reads a file into an array every 4. second (i.e. the page with the script is refreshed every 4. second). The file that is read into the array is written to by other scripts at random intervals.
The problem is that even if the file has changed between two refreshes (I've checked that the file has actually changed), the page is often refreshed several times before the changes appear. I'm thinking this has to do with the file being cached, so the actual physical file is not read on every refresh. I've tried to work around this by calling clearstatcache() at the start of the script, but that doesn't seem to help much.
Any suggestions would be much appreciated.