コード例 #1
0
 public AspNetNotication(
     CacheSpec aCacheSpec,
     SqlCacheDependency aDependency)
 {
     CacheSpec  = aCacheSpec;
     dependency = aDependency;
 }
コード例 #2
0
ファイル: AspNetCache.cs プロジェクト: eliemelki/CSharp-ORM
        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;
        }
コード例 #3
0
 public AbstractCacheExecutor(CachePreference aPreference)
 {
     CacheSpecs = new CacheSpecImpl(aPreference);
     Cache      = Database.Current.Factory.GetCache();
     Generator  = Database.Current.Factory.GetKeyGenerator();
 }