Merge pull request #6576 from nupplaphil/cache_lock_mock