Commit 1ae182bb authored by Matija Obreza's avatar Matija Obreza
Browse files

Set default Hazelcast cache configuration

parent 0b600ddd
......@@ -21,6 +21,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import com.hazelcast.config.Config;
import com.hazelcast.config.EvictionPolicy;
import com.hazelcast.config.ExecutorConfig;
import com.hazelcast.config.GroupConfig;
import com.hazelcast.config.JoinConfig;
......@@ -65,6 +66,17 @@ public class HazelcastConfigDev extends HazelcastConfig {
// See if there's a local HZ running
tcpIpConfig.addMember("127.0.0.1:5702");
MapConfig defaultMapConfig = new MapConfig();
defaultMapConfig.setName("default");
// defaultMapConfig.setTimeToLiveSeconds(0);
defaultMapConfig.setEvictionPolicy(EvictionPolicy.LFU);
// defaultMapConfig.setMaxIdleSeconds();
MaxSizeConfig defaultMaxSizeConfig = new MaxSizeConfig();
defaultMaxSizeConfig.setSize(2000);
defaultMaxSizeConfig.setMaxSizePolicy(MaxSizePolicy.PER_NODE);
defaultMapConfig.setMaxSizeConfig(defaultMaxSizeConfig);
cfg.addMapConfig(defaultMapConfig);
MapConfig tileserverMapConfig = new MapConfig();
tileserverMapConfig.setName("tileserver");
tileserverMapConfig.setTimeToLiveSeconds(tileserverTTL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment