I am trying to use Hazelcast 3.7.x (latest as of this writing) JCache provider and declarative configuration (for the benefits with threading etc.). I need to just set time-to-live-seconds but not max-idle-seconds for my use case. I need to keep the item in the cache only if no updates are done (with reads happening during the entry's life in the cache). If I don't set the max-idle-seconds it defaults to 0 and would keep the entry in the cache forever. If I set it some value less than the TTL it could stay past the intended time as reads could be happening. I could not see how to do it in the hazelcast.xml documentation. I can use the programmatic interface which has different expiry policies but that would have issues with initialization as documented in the Hazelcast documentation. Further if they could do it for JCache provider I'd suspect there would be a way to do it in the XML and not just documented.
If that's not possible and you have a JCache code that works with programmatic configuration with threading issues taken care please post. If it's just matter of single threading the create call I can do it myself.
Thanks S