Class: Innate::Cache::Memory

Inherits:
Hash
  • Object
show all
Includes:
API
Defined in:
lib/innate/cache/memory.rb

Overview

Memory cache is simply a Hash with the Cache::API, it’s the reference implementation for every other cache.

Instance Method Summary collapse

Methods included from API

#cache_clear, #cache_setup

Instance Method Details

#cache_delete(*args) ⇒ Object



17
18
19
# File 'lib/innate/cache/memory.rb', line 17

def cache_delete(*args)
  super{|key| delete(key) }
end

#cache_fetch(*args) ⇒ Object



13
14
15
# File 'lib/innate/cache/memory.rb', line 13

def cache_fetch(*args)
  super{|key| self[key] }
end

#cache_store(*args) ⇒ Object



9
10
11
# File 'lib/innate/cache/memory.rb', line 9

def cache_store(*args)
  super{|key, value| self[key] = value }
end