Question
How do I delete a key from Redis using the Node.js client?
Asked by: USER1812
58 Viewed
58 Answers
Responsive Ad After Question
Answer (58)
Use the `del` command: `client.del('mykey', (err, reply) => { if (err) console.error(err); else console.log(reply); });`. The `reply` will be the number of keys that were removed (1 if 'mykey' existed).