Example #1
0
 public CacheInterceptor(CacheAdapter cache,
                         ICacheKey cacheKey,
                         ILockObjectGenerator lockObjectGenerator,
                         ConfigurationForType configurationForType)
 {
     _cache                = cache;
     _cacheKey             = cacheKey;
     _lockObjectGenerator  = lockObjectGenerator;
     _configurationForType = configurationForType;
 }
Example #2
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;
 }
Example #3
0
 public CacheInterceptor(CacheAdapter cache,
                         ICacheKey cacheKey,
                         ILockObjectGenerator lockObjectGenerator,
                         ConfigurationForType configurationForType,
                         object target)
 {
     _cache                = cache;
     _cacheKey             = cacheKey;
     _lockObjectGenerator  = lockObjectGenerator;
     _configurationForType = configurationForType;
     _target               = target;
     _cachingComponent     = new CachingComponent(cache, cacheKey, configurationForType);
 }
Example #4
0
 public void Initialize(CacheAdapter cache, ICacheKey cacheKey, ILockObjectGenerator lockObjectGenerator)
 {
 }
Example #5
0
 public InMemoryCache(ILockObjectGenerator lockObjectGenerator, int timeoutMinutes)
 {
     _lockObjectGenerator = lockObjectGenerator;
     _timeoutMinutes      = timeoutMinutes;
 }
Example #6
0
 public void Initialize(CacheAdapter cache, ICacheKey cacheKey, ILockObjectGenerator lockObjectGenerator)
 {
     _cache               = cache;
     _cacheKey            = cacheKey;
     _lockObjectGenerator = lockObjectGenerator;
 }
Example #7
0
 /// <summary>
 /// Sets the <see cref="ILockObjectGenerator"/> to be used.
 /// </summary>
 /// <param name="lockObjectGenerator"></param>
 /// <returns></returns>
 public CacheBuilder SetLockObjectGenerator(ILockObjectGenerator lockObjectGenerator)
 {
     _lockObjectGenerator = lockObjectGenerator;
     return(this);
 }
Example #8
0
 private static ILockObjectGenerator lockObjectGeneratorOrNullObject(ILockObjectGenerator lockObjectGenerator)
 {
     return(lockObjectGenerator ?? new nullLockObjectGenerator());
 }
Example #9
0
		public InMemoryCache(ILockObjectGenerator lockObjectGenerator, int timeoutMinutes)
		{
			_lockObjectGenerator = lockObjectGenerator;
			_timeoutMinutes = timeoutMinutes;
		}