powered by Jive Software

Bug in Cache-Konfiguration


i found two bugs in the implementation of Openfire’s cache config:

on line:

The PropertyEventListener checks for “.maxLifeTime” instead of “.maxLifetime”. Thats why lifetime settings will take effect only on restart.

on line:

the cache interface says: getMaxCacheSize() returns long

on line:

the cache interface says that the same value is set as int

Also the documentation of the setMaxCacheSize says (https://github.com/igniterealtime/Openfire/blob/master/xmppserver/src/main/java/org/jivesoftware/util/cache/Cache.java#L77) that the value is in bytes

in the hazelcast plugin the value is used as megabyte (https://docs.hazelcast.org/docs/3.12/javadoc/ -> USED_HEAP_SIZE)

That means that in non cluster environments the cache is in bytes and in cluster environments (with hazelcast) it is in megabytes.

my recommended solution would be that setMaxCacheSize should use long and in hazelcast plugin the value of byte should be converted to megabye.

I can create a pull-request for it

Best Regards


It seems that you are savvy with GitHub. You can suggest a PR to fix that.

thanks for the contribution! Please feel free to submit a PR on github. We welcome any improvements and/or bug fixes. @guus is currently our project lead, so feel free to reach out to him if you have any questions. He and others can usually be found in our chat… open_chat@conference.igniterealtime.org

Thanks again!

Thanks for reporting this! The fix related to the typo / different usage of camel-case will be fixed in Openfire 4.4.3.