예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }