public CacheInterceptor(CacheAdapter cache, ICacheKey cacheKey, ILockObjectGenerator lockObjectGenerator, ConfigurationForType configurationForType) { _cache = cache; _cacheKey = cacheKey; _lockObjectGenerator = lockObjectGenerator; _configurationForType = configurationForType; }
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; }
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); }
public void Initialize(CacheAdapter cache, ICacheKey cacheKey, ILockObjectGenerator lockObjectGenerator) { }
public InMemoryCache(ILockObjectGenerator lockObjectGenerator, int timeoutMinutes) { _lockObjectGenerator = lockObjectGenerator; _timeoutMinutes = timeoutMinutes; }
public void Initialize(CacheAdapter cache, ICacheKey cacheKey, ILockObjectGenerator lockObjectGenerator) { _cache = cache; _cacheKey = cacheKey; _lockObjectGenerator = lockObjectGenerator; }
/// <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); }
private static ILockObjectGenerator lockObjectGeneratorOrNullObject(ILockObjectGenerator lockObjectGenerator) { return(lockObjectGenerator ?? new nullLockObjectGenerator()); }