Module: HTTPX::Plugins::Cache::RequestMethods
- Defined in:
- lib/httpx/plugins/cache.rb
Instance Attribute Summary collapse
-
#cached_response ⇒ Object
points to a previously cached Response corresponding to this request.
Instance Method Summary collapse
- #initialize ⇒ Object
- #merge_headers ⇒ Object
-
#response_cache_key ⇒ Object
returns a unique cache key as a String identifying this request.
Instance Attribute Details
#cached_response ⇒ Object
points to a previously cached Response corresponding to this request.
167 168 169 |
# File 'lib/httpx/plugins/cache.rb', line 167 def cached_response @cached_response end |
Instance Method Details
#initialize ⇒ Object
169 170 171 172 |
# File 'lib/httpx/plugins/cache.rb', line 169 def initialize(*) super @cached_response = nil end |
#merge_headers ⇒ Object
174 175 176 177 |
# File 'lib/httpx/plugins/cache.rb', line 174 def merge_headers(*) super @response_cache_key = nil end |
#response_cache_key ⇒ Object
returns a unique cache key as a String identifying this request
180 181 182 183 184 |
# File 'lib/httpx/plugins/cache.rb', line 180 def response_cache_key return unless (call = @options.cache_key) call[self] end |