private string ExecuteGetAndCacheWithExpiry(IClientCache cache, string url, string key, DateTime absoluteExpiration, out WebException exception) { var result = ExecuteGet(url, out exception ); if (exception == null) { cache.Insert(CreateCacheKey(key, url), result, absoluteExpiration); } return result; }
private string ExecutePostOrPutAndCacheWithExpiry(PostOrPut method, IClientCache cache, string url, string key, TimeSpan slidingExpiration, out WebException exception) { var result = ExecutePostOrPut(method, url, out exception); if (exception == null) { cache.Insert(CreateCacheKey(key, url), result, slidingExpiration); } return result; }
private string ExecuteGetAndCache(IClientCache cache, string url, string key, out WebException exception ) { var result = ExecuteGet(url, out exception); if (exception == null) { cache.Insert(CreateCacheKey(key, url), result); } return result; }