diff --git a/changelog.html b/changelog.html index b0ad3323f..1fa53c99f 100644 --- a/changelog.html +++ b/changelog.html @@ -46,6 +46,7 @@

3.0.1 -- (To be determined)

diff --git a/plugin.xml b/plugin.xml index 0cb75804d..d4ac96ac2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -6,7 +6,7 @@ ${project.description} Ignite Realtime ${project.version} - 2024-11-02 + 2024-11-05 4.8.1 1.8 diff --git a/src/java/org/jivesoftware/openfire/plugin/util/cache/ClusteredCache.java b/src/java/org/jivesoftware/openfire/plugin/util/cache/ClusteredCache.java index d775e1245..90cc666c6 100644 --- a/src/java/org/jivesoftware/openfire/plugin/util/cache/ClusteredCache.java +++ b/src/java/org/jivesoftware/openfire/plugin/util/cache/ClusteredCache.java @@ -302,6 +302,15 @@ public String getCacheSizeRemark() { @Override public long getMaxCacheSize() { + final int size = config.getEvictionConfig().getSize(); + if (size == Integer.MAX_VALUE) { + return -1; // Hazelcast doesn't use negative values. + } + + if (getCapacityUnit() != null && getCapacityUnit() == CapacityUnit.BYTES) { + return config.getEvictionConfig().getSize() * 1024 * 1024L; // Hazelcast stores this as megabyte, not byte. + } + return config.getEvictionConfig().getSize(); }