remove duplication in CachingHttpClient.cs