ttl method

Future<int> ttl(
  1. String key
)

Return the ttl of the given key in seconds. Returns -1, if the key has no ttl. Returns -2, if the key does not exists.

Implementation

Future<int> ttl(String key) async {
  return (await tier1.ttl(key)).toInteger().payload;
}