protected override void AddToCache(string key, object value, CacheItemPriority normal, object o, TimeSpan timeSpan, CacheOptions? cacheOptions) { if (DisabledDueToTesting) return; _cacheManager.Add(key, value, CacheItemPriority.Normal, null, new AbsoluteTime(timeSpan)); if (cacheOptions != null && IsCacheStale(key)) { ClearStaleFlag(key); } }
protected override void AddToCache <T>(string key, T value, CacheItemPriority normal, object o, TimeSpan timeSpan) { if (DisabledDueToTesting) { return; } _cacheManager.Add(key, value, CacheItemPriority.Normal, null, new AbsoluteTime(timeSpan)); if (IsCacheStale(key)) { ClearStaleFlag(key); } }