public void Add(string key, object value) { Alachisoft.NCache.Web.Caching.Cache cache = (Alachisoft.NCache.Web.Caching.Cache)_caches[_primaryCache]; if (cache != null) { cache.Add(key, TagUtil.CreateTaggedCacheItem(value)); } }
public void Add(string sessionId, string key, object value, CacheDependency dependency, DateTime absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) { Alachisoft.NCache.Web.Caching.Cache cache = null; object obj = null; GetCache(sessionId, key, out obj, "", "", out cache, false); if (cache != null) { cache.Add(key, TagUtil.CreateTaggedCacheItem(value, dependency, absoluteExpiration, slidingExpiration, priority)); } }
public void Add(string sessionId, string key, object value) { Alachisoft.NCache.Web.Caching.Cache cache = null; object obj = null; GetCache(sessionId, key, out obj, "", "", out cache, false); if (cache != null) { cache.Add(key, TagUtil.CreateTaggedCacheItem(value)); } }
public OperationResult InitCache(string cacheID) { if (string.IsNullOrEmpty(cacheID)) ThrowInvalidArgumentsException(); OperationResult returnObject = new OperationResult(); try { _cache = Alachisoft.NCache.Web.Caching.NCache.InitializeCache(cacheID); if (!_cache.Contains(ItemVersionKey)) { _cache.Add(ItemVersionKey, ItemVersionValue); } returnObject = CreateReturnObject(Result.SUCCESS, null); } catch (Exception e) { ThrowCacheRuntimeException(e); } return returnObject; }
public void Add(string key, object value, DateTime absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) { _cache.Add(key, value, absoluteExpiration, slidingExpiration, priority); }
public void Add(string sessionId, string key, object value) { _cache.Add(key, TagUtil.CreateTaggedCacheItem(value)); }