Solve caching client racing condition problem by adding sychronize pragma