public XmlRepository(IWebContext webContext, XmlFileSystem fileSystem) { this.webContext = webContext; this.FileSystem = fileSystem; cacheSessionKey = "CachBroker<" + typeof(TEntity).Name + ">.Cache"; SecondLevelCache = new ApplicationCache <TEntity>(Dehydrate); Cache = new SessionCache <TEntity>(SecondLevelCache, Hydrate); logger.DebugFormat("Constructing {0}, file system: {1}", this, FileSystem); }
public SessionCache(ApplicationCache <TEntity> secondLevelCache, Func <TEntity, TEntity> hydrate) { this.secondLevelCache = secondLevelCache; this.hydrate = hydrate; }