cache provider thread safety fix