Redis的超时事件采用订阅/发布(pub/sub)模式。 1、在redis.conf中开启过期通知
notify-keyspace-events Ex # x代表过期
2、订阅Key过期通知
__keyevent@0__:expired #0代表redis中的db索引
Redis的超时事件采用订阅/发布(pub/sub)模式。 1、在redis.conf中开启过期通知
notify-keyspace-events Ex # x代表过期
2、订阅Key过期通知
__keyevent@0__:expired #0代表redis中的db索引