Skip to content

Set redis key/keys

Set redis keys

Set redis key using global object 'g'.

await g.sys.cache.setKey([
    {
        key: "redis_key_name",
        value: "redis_key_value",
        ttl: 1500  // This key will be available till next 1500 seconds.
    },
    {
        key: "redis_key_name",
        value: "redis_key_value"
    }
]);