示例#1
0
文件: Cache.cs 项目: yungtau/oea
 /// <summary>
 /// 构造函数。
 /// </summary>
 /// <param name="cacheProvider">
 /// 本缓存模块需要指定提供器。
 /// </param>
 public Cache(CacheProvider cacheProvider)
 {
     if (cacheProvider == null)
     {
         throw new ArgumentNullException("cacheProvider");
     }
     this._cacheProvider = cacheProvider;
     this.IsEnabled      = true;
 }
示例#2
0
 /// <summary>
 /// 使用指定的硬盘缓存来构造二级缓存。
 /// </summary>
 /// <param name="diskProvider"></param>
 public HybirdCacheProvider(CacheProvider diskProvider)
 {
     this._memory = new MemoryCacheProvider();
     this._disk = diskProvider;
 }
示例#3
0
 /// <summary>
 /// 使用指定的硬盘缓存来构造二级缓存。
 /// </summary>
 /// <param name="diskProvider"></param>
 public HybirdCacheProvider(CacheProvider diskProvider)
 {
     this._memory = new MemoryCacheProvider();
     this._disk   = diskProvider;
 }