On Wed, Jan 20, 2016 at 9:36 PM, David Rush <david.rush@xxxxxxx> wrote:
> What happens if it's updated (re-created) at the same instant that it's
> being requested?
This should be handled carefuly, the updater and the server should not
race on the content of the file but on the file (inode) itself.
You could first create the new file with an extension (e.g. ".tmp")
and then rename it to the served file using "mv -f servedfile.tmp
servedfile", which is usually atomic on Unixes (at least Linux and
BSDs afaict).