Keyspace notifications let clients subscribe (via Pub/Sub) to events about changes to keys — such as a key being set, deleted, or expired. They enable reacting to data changes in Redis, with the expiration event being a particularly common, useful trigger.
Enabling and subscribing
CONFIG SET notify-keyspace-events KEA
PSUBSCRIBE
PSUBSCRIBE
