示例#1
0
		public CacheInterceptor(CacheAdapter cache, ConfigurationForType configurationForType, object target)
		{
			_cache = cache;
			_configurationForType = configurationForType;
			_target = target;
			_cachingComponent = new CachingComponent(cache, configurationForType.CacheKey, configurationForType);
		}
示例#2
0
 public MbCacheFactory(IProxyFactory proxyFactory,
                       CacheAdapter cache,
                       IDictionary <Type, ConfigurationForType> configuredTypes)
 {
     _cache           = cache;
     _configuredTypes = configuredTypes;
     proxyFactory.Initialize(_cache);
     _proxyFactory = proxyFactory;
 }
示例#3
0
 public CachingComponent(CacheAdapter cache,
                         ICacheKey cacheKey,
                         ConfigurationForType configurationForType)
 {
     _cache         = cache;
     _cacheKey      = cacheKey;
     _componentType = configurationForType.ComponentType;
     UniqueId       = configurationForType.CachePerInstance ? Guid.NewGuid().ToString() : "Global";
 }
示例#4
0
 public MbCacheFactory(IProxyFactory proxyFactory,
                       CacheAdapter cache,
                       ICacheKey cacheKey,
                       ILockObjectGenerator lockObjectGenerator,
                       IDictionary <Type, ConfigurationForType> configuredTypes)
 {
     _cache           = cache;
     _cacheKey        = cacheKey;
     _configuredTypes = configuredTypes;
     proxyFactory.Initialize(_cache, cacheKey, lockObjectGeneratorOrNullObject(lockObjectGenerator));
     _proxyFactory = proxyFactory;
 }
示例#5
0
		public CacheInterceptor(CacheAdapter cache, 
										ConfigurationForType configurationForType)
		{
			_cache = cache;
			_configurationForType = configurationForType;
		}