Class: Barley::Cache

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

Instance Method Summary collapse

Constructor Details

#initializeCache

Returns a new instance of Cache.



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

def initialize
  @cache_store = Barley.config.cache_store
end

Instance Method Details

#delete(key) ⇒ Object



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

def delete(key)
  @cache_store.delete(key)
end

#fetch(key, options = {}, &block) ⇒ Object



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

def fetch(key, options = {}, &block)
  @cache_store.fetch(key, options, &block)
end