O'Reilly logo

Mastering Redis by Jeremy Nelson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required