问题描述
我有一个浅表的密钥,应该已过期,在听了它的到期后,我拿起密钥,生成保存真实值的密钥,并尝试获取其值。
代码:
//.: Set the config for "notify-keyspace-events" channel used for expired type events
listener.send_command('config',['set','notify-keyspace-events','Ex']);
// __keyevent@0__:expired is the channel name to which we need to subscribe,0 is the default DB
listener.subscribe('__keyevent@0__:expired');
listener.on('message',(chan,msg) => {
listener.get(`${msg}-details`,redis.print);
});
在运行listener.get之后获得以下错误:
ReplyError:在此情况下仅允许(P)SUBSCRIBE /(P)UNSUBSCRIBE / PING / QUIT错误
我需要真实密钥的值。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)