Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added PERSIST

  • Loading branch information...
commit 9ac3a2c03d797049f33f0ef185de8f32ce28a583 1 parent 5402ef4
@tj authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/commands/keys.js
View
16 lib/commands/keys.js
@@ -29,6 +29,22 @@ exports.expireat = function(client, key, seconds){
};
/**
+ * PERSIST <key>
+ */
+
+exports.persist = function(client, key){
+ var key = string(key)
+ , obj = this.db.data[key];
+
+ if (obj && 'number' == typeof obj.ttl) {
+ delete obj.ttl;
+ client.bool(true);
+ } else {
+ client.bool(false);
+ }
+};
+
+/**
* TTL <key>
*/
Please sign in to comment.
Something went wrong with that request. Please try again.