fixed race condition issue on cacheLocs