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.



9
10
# File 'lib/wurfl_cloud/cache/null.rb', line 9

def initialize(options, environment)
end

Instance Attribute Details

#mtimeObject

Returns the value of attribute mtime.



12
13
14
# File 'lib/wurfl_cloud/cache/null.rb', line 12

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)



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

def [](key)
  nil
end

#[]=(key, value) ⇒ Object

It’s a no-op for the Null cache



30
31
# File 'lib/wurfl_cloud/cache/null.rb', line 30

def []=(key, value)
end

#validate(current_mtime) ⇒ Object

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



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

def validate(current_mtime)
end