Module: HTTPX::Plugins::Cache

Defined in:
lib/httpx/plugins/cache.rb,
lib/httpx/plugins/cache/store.rb,
lib/httpx/plugins/cache/file_store.rb

Overview

This plugin adds support for caching and reusing responses

gitlab.com/os85/httpx/wikis/Cache

Defined Under Namespace

Modules: InstanceMethods, OptionsMethods, RequestMethods, ResponseBodyMethods, ResponseMethods Classes: FileStore, Store

Class Method Summary collapse

Class Method Details

.extra_options(options) ⇒ Object



17
18
19
20
21
# File 'lib/httpx/plugins/cache.rb', line 17

def extra_options(options)
  options.merge(
    response_cache_store: :store,
  )
end

.load_dependenciesObject



12
13
14
15
# File 'lib/httpx/plugins/cache.rb', line 12

def load_dependencies(*)
  require_relative "cache/store"
  require_relative "cache/file_store"
end