ttl method

  1. @override
Future<int> ttl(
  1. String key
)
override

Gets the remaining time to live of a key in seconds.

Returns:

  • -1 if the key exists but has no associated expire.
  • -2 if 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));