ttl abstract method

Future<int> ttl(
  1. String key
)

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

Future<int> ttl(String key);