Example #1
0
 public Cache(Func <IEnumerable <T> > initialCacheFunc)
 {
     this.initialCacheFunc = initialCacheFunc;
     primaryCache          = new PrimaryCache <T>();
     secondaryCaches       = new SecondaryCaches <T>();
     cacheStorageStrategy  = CacheStorageStrategyManager.GetStrategy();
     cacheMissStrategy     = new DefaultCacheMissStrategy <T>();
 }
Example #2
0
 public void SetCacheMissStrategy(ICacheMissStrategy <T> cacheMissStrategy)
 {
     this.cacheMissStrategy = cacheMissStrategy;
 }
Example #3
0
 public void Initialize(Func <IList <T> > warmupFunction, ICacheMissStrategy <T> cacheMissStrategy)
 {
     this.cacheMissStrategy = cacheMissStrategy;
     FillCache(warmupFunction);
 }