Module: CacheBar::ClassMethods

Defined in:
lib/cachebar.rb

Instance Method Summary collapse

Instance Method Details

#caches_api_responses(options) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/cachebar.rb', line 30

def caches_api_responses(options)
  host = if base_uri.present?
    URI.parse(base_uri).host
  else
    options.delete(:host)
  end
  CacheBar.register_api_to_cache(host, options)
end