Class: Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_ext/redis.rb

Instance Method Summary collapse

Instance Method Details

#delete(*args) ⇒ Object



21
22
23
# File 'lib/gem_ext/redis.rb', line 21

def delete(*args)
  del *args
end

#set(key, value, ttl_or_options = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/gem_ext/redis.rb', line 9

def set(key, value, ttl_or_options = nil)
  if ttl_or_options.is_a? Integer
    ttl = ttl_or_options
    options = {}
  else
    options = ttl_or_options || {}
  end
  set_without_cached_record(key, value, options).tap do
    expire key, ttl if ttl
  end
end

#set_without_cached_recordObject



8
# File 'lib/gem_ext/redis.rb', line 8

alias :set_without_cached_record :set