Class: WurflCloud::Cache::Null

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, environment) ⇒ Null

Returns a new instance of Null.



16
17
# File 'lib/wurfl_cloud/cache/null.rb', line 16

def initialize(options, environment)
end

Instance Attribute Details

#mtimeObject

Returns the value of attribute mtime.



19
20
21
# File 'lib/wurfl_cloud/cache/null.rb', line 19

def mtime
  @mtime
end

Instance Method Details

#[](key) ⇒ Object

Should return the value stored for the key, nil if the key is not in cache The Null cache always returns nil (nothing is cacheed)



32
33
34
# File 'lib/wurfl_cloud/cache/null.rb', line 32

def [](key)
  nil
end

#[]=(key, value) ⇒ Object

It’s a no-op for the Null cache



37
38
# File 'lib/wurfl_cloud/cache/null.rb', line 37

def []=(key, value)
end

#validate(current_mtime) ⇒ Object

Validates the cache it’s a no-op in the null cache



27
28
# File 'lib/wurfl_cloud/cache/null.rb', line 27

def validate(current_mtime)
end