public CacheDependency(string[] filenames, string[] cachekeys, CacheDependency dependency, DateTime start)
 {
     _utcStart = start.ToUniversalTime();
     _fileNames = filenames;
     _cacheKeys = cachekeys;
     _cacheDependency = dependency;
 }
Esempio n. 2
0
 public static void SetCache(string CacheKey, object objObject, CommonLibrary.Services.Cache.CacheDependency objDependency, System.DateTime AbsoluteExpiration, System.TimeSpan SlidingExpiration, CacheItemPriority Priority, CacheItemRemovedCallback OnRemoveCallback)
 {
     if (objObject != null)
     {
         if (OnRemoveCallback == null)
         {
             OnRemoveCallback = ItemRemovedCallback;
         }
         CachingProvider.Instance().Insert(GetCacheKey(CacheKey), objObject, objDependency, AbsoluteExpiration, SlidingExpiration, Priority, OnRemoveCallback);
     }
 }
 public override void Insert(string Key, object Value, CommonLibrary.Services.Cache.CacheDependency Dependency, System.DateTime AbsoluteExpiration, System.TimeSpan SlidingExpiration, CacheItemPriority Priority, CacheItemRemovedCallback OnRemoveCallback)
 {
     CommonLibrary.Services.Cache.CacheDependency d = Dependency;
     if (IsWebFarm())
     {
         string[] f = new string[1];
         f[0] = GetFileName(Key);
         CreateCacheFile(f[0], Key);
         d = new CommonLibrary.Services.Cache.CacheDependency(f, null, Dependency);
     }
     base.Insert(Key, Value, d, AbsoluteExpiration, SlidingExpiration, Priority, OnRemoveCallback);
 }
Esempio n. 4
0
 public override void Insert(string Key, object Value, CommonLibrary.Services.Cache.CacheDependency Dependency, System.DateTime AbsoluteExpiration, System.TimeSpan SlidingExpiration, CacheItemPriority Priority, CacheItemRemovedCallback OnRemoveCallback)
 {
     CommonLibrary.Services.Cache.CacheDependency d = Dependency;
     if (IsWebFarm())
     {
         string[] f = new string[1];
         f[0] = GetFileName(Key);
         CreateCacheFile(f[0], Key);
         d = new CommonLibrary.Services.Cache.CacheDependency(f, null, Dependency);
     }
     base.Insert(Key, Value, d, AbsoluteExpiration, SlidingExpiration, Priority, OnRemoveCallback);
 }
 public CacheDependency(string[] filenames, string[] cachekeys, CacheDependency dependency)
 {
     _fileNames = filenames;
     _cacheKeys = cachekeys;
     _cacheDependency = dependency;
 }
Esempio n. 6
0
 public static void SetCache(string CacheKey, object objObject, CommonLibrary.Services.Cache.CacheDependency objDependency, System.DateTime AbsoluteExpiration, System.TimeSpan SlidingExpiration)
 {
     SetCache(CacheKey, objObject, objDependency, AbsoluteExpiration, SlidingExpiration, CacheItemPriority.Normal, null);
 }
Esempio n. 7
0
 public static void SetCache(string CacheKey, object objObject, CommonLibrary.Services.Cache.CacheDependency objDependency)
 {
     SetCache(CacheKey, objObject, objDependency, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.Normal, null);
 }