module HTTPX::Plugins::Cache::RequestMethods

  1. lib/httpx/plugins/cache.rb

Methods

Public Class

  1. new

Public Instance

  1. cached_response
  2. merge_headers
  3. response_cache_key

Attributes

cached_response [RW]

points to a previously cached Response corresponding to this request.

Public Class methods

new(*)
[show source]
    # File lib/httpx/plugins/cache.rb
169 def initialize(*)
170   super
171   @cached_response = nil
172 end

Public Instance methods

merge_headers(*)
[show source]
    # File lib/httpx/plugins/cache.rb
174 def merge_headers(*)
175   super
176   @response_cache_key = nil
177 end
response_cache_key()

returns a unique cache key as a String identifying this request

[show source]
    # File lib/httpx/plugins/cache.rb
180 def response_cache_key
181   return unless (call = @options.cache_key)
182 
183   call[self]
184 end