I have set up Hazelcast 3.12 near cache for my application (java spring), and according to my configuration, it should invalidate the cache entries after 60 seconds. But for some reason, it doesn't seem to be doing so.
According to the documentation, both time-to-live-seconds and max-idle-seconds are set to 60 seconds, which means the entries should be invalidated after that time. However, I am finding that the collection is not empty (size = 4) even after waiting for 60 seconds, i even made it 3 seconds and still the data is in the cache map.

I've double-checked the configuration, and everything seems to be correct. I'm wondering if I'm missing something or if there's a known issue related to this.
Any insight or help would be greatly appreciated!
Here's my configuration:
<near-cache name="near-cache-map">
<in-memory-format>BINARY</in-memory-format>
<invalidate-on-change>true</invalidate-on-change>
<eviction eviction-policy="LRU" max-size-policy="ENTRY_COUNT" size="10000"/>
<time-to-live-seconds>60</time-to-live-seconds>
<max-idle-seconds>60</max-idle-seconds>
<local-update-policy>INVALIDATE</local-update-policy>
</near-cache>
The purpose of NearCache is to avoid network calls. It is useful when the IMap is mostly read-only. See the explanation in the documentation
So NearCache only caches the result of get() call. All other calls are still delegated to original IMap. Let's see an example. On the server side create an IMap and update it every second.
We are going to see the value changing every 1 second
Now on the client side have this XML
Start the client with a NearCache and a timer
You are going to see that the client reads the same IMap value for 10 seconds even though it was updated on the server. Because it is using the locally cached value for NearCache. This is the purpose of NearCache. And then 10 seconds later after the local entry expires the client will fetch the new value from the remote IMap
I hope this clarifies the situation