ttl method
Gets the remaining time to live of a key in seconds.
Returns:
-1if the key exists but has no associated expire.-2if the key does not exist.- A positive integer representing the remaining TTL.
Implementation
@override
Future<int> ttl(String key) =>
_executeOnKey(key, (client) => client.ttl(key));