@SuppressWarnings("SameParameterValue")
		void addDistCache(String cacheName, int timeout, int count) {
			MapConfig mapConfig = createDistMapConfig(cacheName, timeout);

			NearCacheConfig nearCacheConfig = new NearCacheConfig(cacheName);
			nearCacheConfig.setTimeToLiveSeconds(timeout);

			if (count > 0) {
				EvictionConfig evictionConfig = new EvictionConfig();
				evictionConfig.setEvictionPolicy(EvictionPolicy.LRU);
				evictionConfig.setSize(count);
				evictionConfig.setMaxSizePolicy(MaxSizePolicy.PER_NODE);

				mapConfig.setEvictionConfig(evictionConfig);

				nearCacheConfig.getEvictionConfig()
					.setSize(count)
					.setMaxSizePolicy(MaxSizePolicy.ENTRY_COUNT)
					.setEvictionPolicy(EvictionPolicy.LRU);
			}

			mapConfig.setNearCacheConfig(nearCacheConfig);
			hazelcastCacheConfigs.put(cacheName, mapConfig);
		}
Dynamic cache configuration. it creates local cache or dist cache.

@since 3.1
ngrinder-controller/src/main/java/org/ngrinder/infra/config/DynamicCacheConfig.java