PrestaShop/PrestaShop — pull request #407 by zecrazytux (2013-04-26 13:09:20+00:00)
Title: [-] Fixes a race condition

Fixes a race condition leading to file corruption and PHP crashes when
writing the cache index file.

Handles concurrency properly by using a temporary file and an atomic
rename() instead of file_put_contents(), which is not atomic, on a
file which is potentially accessed by many processes at the same time