Redis key invalidation removal event listener
1. Events are distributed through the subscription and publishing function (pub/sub) of Redis, so it is necessary to subscribe
See __keyevent@0__:expired channel
0 means db0 selects the appropriate number according to its own dbindex
2. Modify the redis.conf file
Modify notify-keyspace-events Ex
3. Restart redis, you can test the trigger of the failure event, and the value obtained by listening is the key
doc reference: http://redis.readthedocs.org/en/latest/topic/notification.html