Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
! Fixed... Maybe... Maybe... Finally fixed race conditions in PHP fil…
…e caching. Needs testing, but at least I'm no longer able to reproduce the problem. (Subs.php) @ Imagine you're uploading a modified file to your server, and it has several visitors, and one of them is loading a page at the same time. The cacher will look for a cached version, will find it's outdated, and rebuild it. Now, here's the trick: if this happens DURING the upload, the file won't be complete, but it'll still be used for caching. The trick here, since we don't know the final expected filesize, is to instead check the file date. If it's very recent (0, 1 or 2 seconds old), we'll wait for one more second and check again, until the file is old enough. This isn't perfect, but should handle 99% of all possible race conditions.
- Loading branch information