2019-08-14 09:48:44 +00:00
|
|
|
module Redis::Alfred
|
2020-01-23 17:29:07 +00:00
|
|
|
CONVERSATION_MAILER_KEY = 'CONVERSATION::%d'.freeze
|
|
|
|
|
2019-08-14 09:48:44 +00:00
|
|
|
class << self
|
|
|
|
def rpoplpush(source, destination)
|
|
|
|
$alfred.rpoplpush(source, destination)
|
|
|
|
end
|
|
|
|
|
2019-10-20 08:47:26 +00:00
|
|
|
def lpush(key, value)
|
|
|
|
$alfred.lpush(key, value)
|
2019-08-14 09:48:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def delete(key)
|
|
|
|
$alfred.del(key)
|
|
|
|
end
|
|
|
|
|
2019-10-20 08:47:26 +00:00
|
|
|
def lrem(key, value, count = 0)
|
|
|
|
$alfred.lrem(key, count, value)
|
2019-08-14 09:48:44 +00:00
|
|
|
end
|
2020-01-23 17:29:07 +00:00
|
|
|
|
|
|
|
def setex(key, value, expiry = 1.day)
|
|
|
|
$alfred.setex(key, expiry, value)
|
|
|
|
end
|
|
|
|
|
|
|
|
def get(key)
|
|
|
|
$alfred.get(key)
|
|
|
|
end
|
2019-08-14 09:48:44 +00:00
|
|
|
end
|
|
|
|
end
|