コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebServiceCache"/> class.
 /// </summary>
 public WebServiceCache()
 {
     Cache = (HttpRuntime.Cache ?? HostingEnvironment.Cache);
     Settings = new ServiceCacheSettings(new DefaultFileTouchableCacheItem(this, new DefaultTouchableCacheItem(this, null)));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServerAppFabricServiceCache"/> class.
 /// </summary>
 /// <param name="cache">The cache.</param>
 public ServerAppFabricServiceCache(DataCache cache)
 {
     Cache = cache;
     Settings = new ServiceCacheSettings(new DefaultTouchableCacheItem(this, null));
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MemcachedServiceCache" /> class.
 /// </summary>
 /// <param name="connection">The connection.</param>
 /// <exception cref="System.ArgumentNullException">connection</exception>
 public RedisServiceCache(IDatabase database)
 {
     if (database == null)
         throw new ArgumentNullException("database");
     Cache = database;
     Settings = new ServiceCacheSettings();
 }