redis / ioredis

🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
MIT License
14.39k stars 1.2k forks source link

Listener event expired key and dispatch actions? #1105

Open DeeSouza opened 4 years ago

DeeSouza commented 4 years ago

I want that when Redis deletes a record when the expiration time expires, an action in NodeJS is invoked.

It is possible?

luin commented 4 years ago

Yeah, ioredis supports keyspace notifications via redis.psubscribe: https://redis.io/topics/notifications#timing-of-expired-events.