Class: RenuoCmsRails::Cache::Cacher
- Inherits:
-
Object
- Object
- RenuoCmsRails::Cache::Cacher
- Defined in:
- lib/renuo_cms_rails/cache/cacher.rb
Instance Method Summary collapse
- #get(content_path) ⇒ Object
-
#initialize(api) ⇒ Cacher
constructor
A new instance of Cacher.
- #initialize_cache ⇒ Object
Constructor Details
#initialize(api) ⇒ Cacher
Returns a new instance of Cacher.
4 5 6 |
# File 'lib/renuo_cms_rails/cache/cacher.rb', line 4 def initialize(api) @api = api end |
Instance Method Details
#get(content_path) ⇒ Object
12 13 14 15 |
# File 'lib/renuo_cms_rails/cache/cacher.rb', line 12 def get(content_path) return unless @contents @contents[content_path] end |
#initialize_cache ⇒ Object
8 9 10 |
# File 'lib/renuo_cms_rails/cache/cacher.rb', line 8 def initialize_cache @contents = @api.fetch_contents end |