我已经将Hazelcast缓存配置为在spring引导应用程序中分发。
<group>
<name>instance1</name>
<password>pass</password>
</group>
<map name="users">
<!-- <time-to-live-seconds>30</time-to-live-seconds> -->
<max-idle-seconds>30</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">5000</max-size>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<read-backup-data>false</read-backup-data>
</map>
<network>
<port auto-increment="true" port-count="100">5701</port>
<join>
<multicast enabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<!-- <tcp-ip enabled="false"> <member>127.0.0.1:5709</member> <member>127.0.0.1:5710</member>
</tcp-ip> -->
<tcp-ip enabled="true">
<interface>127.0.0.1</interface>
</tcp-ip>
<aws enabled="false" />
</join>
</network>
<properties>
<property name="hazelcast.http.healthcheck.enabled">false</property>
<property name="hazelcast.health.monitoring.delay.seconds">3000</property>
<property name="hazelcast.heartbeat.interval.seconds">1500</property>
<property name="hazelcast.health.monitoring.level">SILENT</property>
<property name="hazelcast.client.statistics.enabled">false</property>
<property name="hazelcast.initial.min.cluster.size">0</property>
<property name="hazelcast.initial.wait.seconds">0</property>
</properties>如果我像上面那样创建了一个组,那么无论我在哪里添加这个组,实例缓存都是同步的。
我希望本地缓存用于相同实例,其中很少的缓存不应该被共享。
如何在应用程序中同时做本地缓存和分布式缓存?
https://stackoverflow.com/questions/51345433
复制相似问题