This link has been bookmarked by 2 people . It was first bookmarked on 10 Jul 2009, by fulvius longhi.
-
-
It’s smarter to write your changes to a temporary file, which you then rename. If you’re serving cache.html and you want to update it, you open a new file and write it as cache.html.tmp. Then rename it cache.html. Since renaming is an atomic function, you’re never going to see a partial file, and it won’t interfere with active readers of the file.
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.