Redis keyspace notifications
A common use case when using Redis is the ability for an application to respond to changes that may occur to the value stored at a particular key or keys. Fortunately, since version 2.8, Redis provides a mechanism for client code to subscribe to a Pub/Sub channel that monitors events related to data. Called keyspace notification, functionality for monitoring events like all the commands that change a given key, all keys receiving specific commands such as HSET, or all keys that are about to be deleted because of an EXPIRE command. Using Redis Pub/Sub allows existing Redis clients that already implement Pub/Sub to use keyspace notification to respond to changes in the Redis data.
When a command is issued that triggers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access