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 _getInteger(await _execCmd(['TTL', key]));
}