Class: Lux::Cache::NullCache

Inherits:
Object
  • Object
show all
Defined in:
lib/lux/cache/lib/null.rb

Instance Method Summary collapse

Instance Method Details

#delete(key) ⇒ Object



14
15
16
# File 'lib/lux/cache/lib/null.rb', line 14

def delete key
  nil
end

#fetch(key, ttl = nil) ⇒ Object



10
11
12
# File 'lib/lux/cache/lib/null.rb', line 10

def fetch key, ttl=nil
  yield
end

#get(key) ⇒ Object



6
7
8
# File 'lib/lux/cache/lib/null.rb', line 6

def get key
  nil
end

#get_multi(*args) ⇒ Object



18
19
20
# File 'lib/lux/cache/lib/null.rb', line 18

def get_multi *args
  {}
end

#set(key, data, ttl = nil) ⇒ Object



2
3
4
# File 'lib/lux/cache/lib/null.rb', line 2

def set key, data, ttl=nil
  data
end