示例#1
0
        public void InsertAsync(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.InsertAsync(key, TagUtil.CreateTaggedCacheItem(value), null, null, null);
            }
        }
示例#2
0
        public void InsertAsync(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.InsertAsync(key, TagUtil.CreateTaggedCacheItem(value, dependency, absoluteExpiration, slidingExpiration, priority), DSWriteOption.None, null);
            }
        }
示例#3
0
        public void InsertAsync(string sessionId, string key, CacheItem item, string group, string subGroup)
        {
            Alachisoft.NCache.Web.Caching.Cache cache = null;
            object obj = null;

            GetCache(sessionId, key, out obj, group, subGroup, out cache, false);
            if (cache != null)
            {
                item.Tags = new Runtime.Caching.Tag[] { new Runtime.Caching.Tag(TagUtil.SESSION_TAG) };
                cache.InsertAsync(key, item, DSWriteOption.None, null);
            }
        }
示例#4
0
 public void InsertAsync(string sessionId, string key, object value)
 {
     _cache.InsertAsync(key, value, null, null, null);
 }