How to receive Redis expire events with node?
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)