0
votes

Suppose I have a Hazelcast map which has a TTL defined of 86400 seconds in the config file, which is used while initializing the map.

However, I observe in the code while adding entries in the map ( using map.put() ) - another TTL is also being passed for all individual values.

I wish to understand the expected behavior with such configuration.

Will the TTL at key level be considered superior and TTL and map level would be disregarded?

1

1 Answers

1
votes

Yes; when you set the TTL using the IMap#put(key,value,ttl,timeunit) API, it overrides the TTL value which is defined by the map's configuration.