Class: Lux::Cache::NullServer

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

Instance Method Summary collapse

Constructor Details

#initializeNullServer

Returns a new instance of NullServer.



4
5
6
# File 'lib/lux/cache/lib/null_server.rb', line 4

def initialize
  @server = nil
end

Instance Method Details

#clearObject



28
29
30
# File 'lib/lux/cache/lib/null_server.rb', line 28

def clear
  true
end

#delete(key) ⇒ Object



20
21
22
# File 'lib/lux/cache/lib/null_server.rb', line 20

def delete key
  nil
end

#fetch(key, ttl = nil) ⇒ Object



16
17
18
# File 'lib/lux/cache/lib/null_server.rb', line 16

def fetch key, ttl=nil
  yield
end

#get(key) ⇒ Object



12
13
14
# File 'lib/lux/cache/lib/null_server.rb', line 12

def get key
  nil
end

#get_multi(*args) ⇒ Object



24
25
26
# File 'lib/lux/cache/lib/null_server.rb', line 24

def get_multi *args
  {}
end

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



8
9
10
# File 'lib/lux/cache/lib/null_server.rb', line 8

def set key, data, ttl=nil
  data
end