Redis Config Set with Node jS [英] Redis Config Set with Node jS

查看:64
本文介绍了Redis Config Set with Node jS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

团队,

我正在尝试使用 NODE js 应用程序在运行时设置 redis 的配置,如下所示.

i am trying to set config of redis at runtime using NODE js application as below.

let setConfig = await this.cacheConnection.config("set", "notify-keyspace-events", "Ex");let setConfig = await this.cacheConnection.config("SET", "notify-keyspace-events", "Ex");

以上代码总是向我返回 false.

Above code is always returning false to me.

我在我的应用程序中使用了 redis 节点模块.所有其他命令,如 getAsync、SetAsync 对我来说都运行良好.let result = await this.cacheConnection.getAsync("keyname");

I am using redis node module in my application.All other commands like getAsync,SetAsync are working perfectly fine for me. let result = await this.cacheConnection.getAsync("keyname");

这里的任何建议都会很棒.

Any suggestion here would be great.

推荐答案

this.cacheConnection.configAsync("SET", "notify-keyspace-events", "KExe$");

this.cacheConnection.configAsync("SET", "notify-keyspace-events", "KExe$");

这篇关于Redis Config Set with Node jS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆