예제 #1
0
        /// <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);
        }
예제 #3
0
 public virtual void Clear()
 {
     cache.Dispose();
     cache = memoryCacheProvider.Create(sizeLimit);
 }