Value | Behaviour |
---|---|
undefined |
Entry ttl won't be updated and will remain the same. |
INFINITE_EXPIRATION | Entry ttl is discarded, so that it will never expire. |
ttl of old value | Entry ttl won't be updated and will remain the same. Notice that timer is not reset, meaning that if old value remains to live x seconds, it will be evicted after x seconds. |
ttl different from old value | Entry ttl will be updated to the new ttl. Timer will be reset, so that new value remains to live expiresAfter seconds. |
Timestamp from when ttl starts counting in seconds as Unix Timestamp.
Defaults to current unix timestamp when expiresAfter
is given.
Time to live for
key
in seconds.When inserting the key, use INFINITE_EXPIRATION or omit this option to specify that the key should not expire.
When ttl is updated, depending on the value of
expiresAfter
param, following behaviours will occur: