module Legion::Extensions::Redis::Runners::Item
Public Instance Methods
decrement(key:, number: 1, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 12 def decrement(key:, number: 1, **opts) { result: client(**opts).decrby(key, number) } end
delete(key:, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 16 def delete(key:, **opts) { result: client(**opts).del(key) } end
exists(key:, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 20 def exists(key:, **opts) { result: client(**opts).exists?(key) } end
get(key:, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 8 def get(key:, **opts) { result: client(**opts).get(key) } end
increment(key:, number: 1, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 24 def increment(key:, number: 1, **opts) { result: client(**opts).incrby(key, number) } end
keys(glob: '*', **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 28 def keys(glob: '*', **opts) { result: client(**opts).keys(glob) } end
rename(old_key, key:, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 32 def rename(old_key, key:, **opts) { result: client(**opts).rename(old_key, key) } end
set(key:, value:, ttl: nil, **opts)
click to toggle source
# File lib/legion/extensions/redis/runners/item.rb, line 36 def set(key:, value:, ttl: nil, **opts) { result: client(**opts).set(key, value, ex: ttl) } end