when new notifications are pushed to uids clear their old notifications.
This commit is contained in:
barisusakli
2014-09-10 20:51:16 -04:00
parent 5204dc1e23
commit 35a903f9c8
4 changed files with 24 additions and 0 deletions

View File

@@ -55,6 +55,16 @@ module.exports = function(redisClient, module) {
multi('zrem', keys, value, callback);
};
module.sortedSetsRemoveRangeByScore = function(keys, min, max, callback) {
var multi = redisClient.multi();
for(var i=0; i<keys.length; ++i) {
multi.zremrangebyscore(keys[i], min, max);
}
multi.exec(function(err) {
callback(err);
});
};
module.getSortedSetRange = function(key, start, stop, callback) {
redisClient.zrange(key, start, stop, callback);
};