'MapState updateTtlOnReadAndWrite based on keys or values?

With a MapState and TTL config set to updateTtlOnReadAndWrite(), is the TTL updated when a key is read (e.g. calling map.keys()) or only when the value associated is retrieved?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source