After learning the hard way, file_put_contents may not flush the file to disk (it's a very old bug). Caches are written using this function, which may cause intermittent race conditions. The file writing needs to use lower-level functions to write files and ensure it is flushed to disk.
After learning the hard way,
file_put_contents
may not flush the file to disk (it's a very old bug). Caches are written using this function, which may cause intermittent race conditions. The file writing needs to use lower-level functions to write files and ensure it is flushed to disk.