/// <summary> /// Cache which has a hard limit: no more elements will be cached than the limit. /// </summary> public DefaultDeploymentCache(int limit) { this.sizeLimit = limit; memoryCacheProvider = ProcessEngineServiceProvider.Resolve <MemoryCacheProvider>(); cache = memoryCacheProvider.Create(limit); }
/// <summary> /// Cache which has a hard limit: no more elements will be cached than the limit. </summary> public ProcessDefinitionInfoCache(ICommandExecutor commandExecutor, int limit) { this.commandExecutor = commandExecutor; sizeLimit = limit; memoryCacheProvider = ProcessEngineServiceProvider.Resolve <MemoryCacheProvider>(); cache = memoryCacheProvider.Create(limit); }
public virtual void Clear() { cache.Dispose(); cache = memoryCacheProvider.Create(sizeLimit); }