powered by Jive Software

[bug_report] Hazelcast backed Cache's do not honour setMaxLifetime / setMaxCacheSize

I recently came across an issue whereby if you set a cache size/lifetime using Cache.setMaxCacheSize() / Cache.setMaxLifetime() it has no effect on Hazelcast backed Caches - configuration is taken solely from the hazelcast-cache-config.xml file.

I’ve created a patch that configures the underlying Hazelcast IMap based on the values that were previously set by these methods, defaulting to the values in hazelcast-cache-config.xml if not present. Some discussion on this can be found at https://groups.google.com/forum/#!topic/hazelcast/DYmHGo-sCnI

Note; currently it’s not possible to modify these values after an IMap has been created - the Javadoc for Cache has been updated to reflect this. hazelcast/hazelcast#592 suggests that this ability is coming in Hazelcast 3.9.

In the meantime, I’ve generated a PR that will at least honour previously set values.

OK, for some reason the Ant-based Travis build is failing with that PR - Travis CI - Test and Deploy Your Code with Confidence

I can’t figure out why - it’s fine locally, and there’s no obvious error in the log file. If anyone can suggest what’s wrong, I’m happy to fix it!