diff --git a/lib/discourse_redis.rb b/lib/discourse_redis.rb index b4943fde9e2..560d5912f0d 100644 --- a/lib/discourse_redis.rb +++ b/lib/discourse_redis.rb @@ -49,7 +49,7 @@ class DiscourseRedis [:append, :blpop, :brpop, :brpoplpush, :decr, :decrby, :exists, :expire, :expireat, :get, :getbit, :getrange, :getset, :hdel, :hexists, :hget, :hgetall, :hincrby, :hincrbyfloat, :hkeys, :hlen, :hmget, :hmset, :hset, :hsetnx, :hvals, :incr, :incrby, :incrbyfloat, :lindex, :linsert, :llen, :lpop, :lpush, :lpushx, :lrange, :lrem, :lset, :ltrim, - :mapped_hmset, :mapped_hmget, :mapped_mget, :mapped_mset, :mapped_msetnx, :mget, :move, :mset, + :mapped_hmset, :mapped_hmget, :mapped_mget, :mapped_mset, :mapped_msetnx, :move, :mset, :msetnx, :persist, :pexpire, :pexpireat, :psetex, :pttl, :rename, :renamenx, :rpop, :rpoplpush, :rpush, :rpushx, :sadd, :scard, :sdiff, :set, :setbit, :setex, :setnx, :setrange, :sinter, :sismember, :smembers, :sort, :spop, :srandmember, :srem, :strlen, :sunion, :ttl, :type, :watch, :zadd, :zcard, :zcount, :zincrby, :zrange, :zrangebyscore, :zrank, :zrem, :zremrangebyrank, @@ -60,6 +60,11 @@ class DiscourseRedis end end + def mget(*args) + args.map!{|a| "#{namespace}:#{a}"} + DiscourseRedis.ignore_readonly { @redis.mget(*args) } + end + def del(k) DiscourseRedis.ignore_readonly do k = "#{namespace}:#{k}"