added EXPIRES, PERSISTS, TTL, and EX keyword

This commit is contained in:
Josh Baker 2016-07-15 13:06:11 -07:00
parent 638c35b5b9
commit e766dd75ae
2 changed files with 120 additions and 2 deletions

View File

@ -17,6 +17,13 @@
"type": ["string", "double"],
"optional": true,
"multiple": true
},
{
"command": "EX",
"name": ["seconds", "value"],
"type": ["string", "double"],
"optional": true,
"multiple": false
},
{
"name": "value",
@ -93,6 +100,58 @@
"since": "1.0.0",
"group": "keys"
},
"EXPIRE": {
"summary": "Set a timeout on an id",
"complexity": "O(1)",
"arguments":[
{
"name": "key",
"type": "string"
},
{
"name": "id",
"type": "string"
},
{
"name": "seconds",
"type": "double"
}
],
"since": "1.0.0",
"group": "keys"
},
"TTL": {
"summary": "Get a timeout on an id",
"complexity": "O(1)",
"arguments":[
{
"name": "key",
"type": "string"
},
{
"name": "id",
"type": "string"
}
],
"since": "1.0.0",
"group": "keys"
},
"PERSIST": {
"summary": "Remove the existing timeout on an id",
"complexity": "O(1)",
"arguments":[
{
"name": "key",
"type": "string"
},
{
"name": "id",
"type": "string"
}
],
"since": "1.0.0",
"group": "keys"
},
"FSET": {
"summary": "Set the value for a single field of an id",
"complexity": "O(1)",

View File

@ -179,6 +179,13 @@ var commandsJSON = `{
"type": ["string", "double"],
"optional": true,
"multiple": true
},
{
"command": "EX",
"name": ["seconds", "value"],
"type": ["string", "double"],
"optional": true,
"multiple": false
},
{
"name": "value",
@ -255,6 +262,58 @@ var commandsJSON = `{
"since": "1.0.0",
"group": "keys"
},
"EXPIRE": {
"summary": "Set a timeout on an id",
"complexity": "O(1)",
"arguments":[
{
"name": "key",
"type": "string"
},
{
"name": "id",
"type": "string"
},
{
"name": "seconds",
"type": "double"
}
],
"since": "1.0.0",
"group": "keys"
},
"TTL": {
"summary": "Get a timeout on an id",
"complexity": "O(1)",
"arguments":[
{
"name": "key",
"type": "string"
},
{
"name": "id",
"type": "string"
}
],
"since": "1.0.0",
"group": "keys"
},
"PERSIST": {
"summary": "Remove the existing timeout on an id",
"complexity": "O(1)",
"arguments":[
{
"name": "key",
"type": "string"
},
{
"name": "id",
"type": "string"
}
],
"since": "1.0.0",
"group": "keys"
},
"FSET": {
"summary": "Set the value for a single field of an id",
"complexity": "O(1)",