System generated get redis key api
- To get the value of redis key, use get-redis-key system API.
Request Method: POST
URL
/api/system-api/user-path/get-redis-key
Request payload, single key
| {
"keys": "redis_key_name"
}
|
Request payload, multiple keys
| {
"keys": [
"redis_key_name",
"redis_key_name"
]
}
|
Get redis keys
Get redis key using global object 'g'.
- Get single redis key value.
| await g.sys.cache.getKey("REDIS_KEY_NAME");
|
- Get multiple redis keys values.
| await g.sys.cache.getKey(["REDIS_KEY_NAME", "ANOTHER_REDIS_KEY_NAME"]);
|
API Response, single key
| {
"success": true,
"statusCode": 200,
"data": "redis_key_value"
}
|
API Response, multiple keys
| {
"success": true,
"statusCode": 200,
"data": [
"redis_key_value",
"redis_key_value"
]
}
|