redis.io/topics/notificationsSET notify-keyspace-events Ex
SUBSRCIBE __keyevent@0__:expired
$redisSub = new Redis() or die("Can't create to redis database instance!\n");
$redisSub->connect('localhost', 6379) or die("Can't connect to redis database!\n");
$redisSub->select(2) or die("Can't select database!\n");
$redisSub->setOption(Redis::OPT_READ_TIMEOUT, -1);
$redisSub->config('SET', 'notify-keyspace-events', 'Ex');
$redisSub->subscribe(['__keyevent@2__:expired'], 'msg'); // db 2
function msg($redisSub, $chan, $msg) {
}