Module: HTTPX::Plugins::Cache::ResponseMethods
- Defined in:
- lib/httpx/plugins/cache.rb
Instance Attribute Summary collapse
-
#original_request ⇒ Object
a copy of the request this response was originally cached from.
Instance Method Summary collapse
-
#cached? ⇒ Boolean
whether this Response was duplicated from a previously HTTPX::Plugins::Cache::RequestMethods#cached_response.
- #initialize ⇒ Object
-
#mark_as_cached! ⇒ Object
sets this Response as being duplicated from a previously cached response.
Instance Attribute Details
#original_request ⇒ Object
a copy of the request this response was originally cached from
196 197 198 |
# File 'lib/httpx/plugins/cache.rb', line 196 def original_request @original_request || @request end |
Instance Method Details
#cached? ⇒ Boolean
whether this Response was duplicated from a previously HTTPX::Plugins::Cache::RequestMethods#cached_response.
201 202 203 |
# File 'lib/httpx/plugins/cache.rb', line 201 def cached? @cached end |
#initialize ⇒ Object
190 191 192 193 |
# File 'lib/httpx/plugins/cache.rb', line 190 def initialize(*) super @cached = false end |
#mark_as_cached! ⇒ Object
sets this Response as being duplicated from a previously cached response.
206 207 208 |
# File 'lib/httpx/plugins/cache.rb', line 206 def mark_as_cached! @cached = true end |