/// <summary>
 /// Initializes a new instance of the <see cref="MemcachedServiceCache"/> class.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="tagMapper">The tag mapper.</param>
 public MemcachedServiceCache(IMemcachedClient client, ITagMapper tagMapper)
 {
     if (client == null)
     {
         throw new ArgumentNullException("client");
     }
     Cache      = client;
     _tagMapper = tagMapper;
     Settings   = new ServiceCacheSettings();
 }
Esempio n. 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));
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StaticServiceCache"/> class.
 /// </summary>
 public StaticServiceCache()
 {
     Settings = new ServiceCacheSettings(new DefaultFileTouchableCacheItem(this, new DefaultTouchableCacheItem(this, null)));
 }
Esempio n. 4
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)));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SystemServiceCache"/> class.
 /// </summary>
 /// <param name="cache">The cache.</param>
 public SystemServiceCache(SystemCaching.ObjectCache cache)
 {
     Cache    = cache;
     Settings = new ServiceCacheSettings(new DefaultFileTouchableCacheItem(this, new DefaultTouchableCacheItem(this, null)));
 }