I want to insert expiration date in Redis based on TTL. How can I count the expiration date?
I'm trying to use TimeCategory
class, here is the example:
def ttl = 3600;
def date = new Date()
TimeDuration duration = getSeconds(ttl)
TimeDuration expiryDate = date.plus.duration
Is that a correct approach to expiry date counting?