public AspNetNotication( CacheSpec aCacheSpec, SqlCacheDependency aDependency) { CacheSpec = aCacheSpec; dependency = aDependency; }
public void Add(string aKey, object aValue, AspNetNotication aNotification) { CacheSpec cacheSpecs = aNotification.GetCacheSpec(); CachePreference pref = cacheSpecs.GetCachePreferences(); cache.Add( aKey, aValue, aNotification.GetDependency(), DateTime.Now.AddSeconds(pref.CacheDuration), System.Web.Caching.Cache.NoSlidingExpiration, CacheItemPriority.Normal, new CacheItemRemovedCallback(this.CacheItemRemovedCallback) ); CachedKeys[aKey] = null; }
public AbstractCacheExecutor(CachePreference aPreference) { CacheSpecs = new CacheSpecImpl(aPreference); Cache = Database.Current.Factory.GetCache(); Generator = Database.Current.Factory.GetKeyGenerator(); }