Redis Config Set with Node jS [英] 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屋!