Module: Typhoeus::Request::Memoizable Private
- Included in:
- Typhoeus::Request
- Defined in:
- lib/typhoeus/request/memoizable.rb
Overview
Instance Method Summary collapse
-
#memoizable? ⇒ Boolean
private
Return whether a request is memoizable.
-
#response=(response) ⇒ Object
private
Override response setter and memoizes response if the request is memoizable.
Instance Method Details
#memoizable? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return whether a request is memoizable.
32 33 34 35 |
# File 'lib/typhoeus/request/memoizable.rb', line 32 def memoizable? Typhoeus::Config.memoize && ([:method].nil? || [:method] == :get) end |
#response=(response) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Override response setter and memoizes response if the request is memoizable.
21 22 23 24 |
# File 'lib/typhoeus/request/memoizable.rb', line 21 def response=(response) hydra.memory[self] = response if memoizable? super end |