CacheCache icon indicating copy to clipboard operation
CacheCache copied to clipboard

Is the File backend resistent to concurrency issues?

Open halfer opened this issue 11 years ago • 0 comments

A couple of sources from the web (here, here) suggest that file_put_contents is susceptible to race conditions - a read could get a half-saved file before it has been fully written.

This apparently can be handled by writing to a temporary file and renaming it over the top of the old one, or by using file locks. Is this worth looking into?

I should clarify that I've not actually experienced any concurrency issues - just wonder if it is a possibility.

halfer avatar Nov 13 '14 00:11 halfer