Added sleep() workaround for windows php rename bug
merged branch caponica/cache-clear-win-workaround (PR #8767)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8767).

Discussion
----------

Added sleep() workaround for windows php rename bug

For more info see links in issue #8766

Commits
-------

b3c815b Added sleep() workaround for windows php rename bug