+ /* If the key does not exist at all, return -2 */
+ if (expire == -1 && lookupKeyRead(c->db,c->argv[1]) == NULL) {
+ addReplyLongLong(c,-2);
+ return;
+ }
+ /* The key exists. Return -1 if it has no expire, or the actual
+ * TTL value otherwise. */