sig/plugins/response_cache.rbs in httpx-0.20.3 vs sig/plugins/response_cache.rbs in httpx-0.20.4

- old
+ new

@@ -6,28 +6,48 @@ def self?.cacheable_request?: (Request request) -> bool def self?.cacheable_response?: (response response) -> bool def self?.cached_response?: (response response) -> bool class Store - @store: Hash[URI::Generic, Response] + @store: Hash[String, Array[Response]] - def lookup: (URI::Generic uri) -> Response? + def lookup: (Request request) -> Response? - def cached?: (URI::Generic uri) -> bool + def cached?: (Request request) -> boolish - def cache: (URI::Generic uri, Response response) -> void + def cache: (Request request, Response response) -> void def prepare: (Request request) -> void + + private + + def match_by_vary?: (Request request, Response response) -> bool end module InstanceMethods @response_cache: Store def clear_response_cache: () -> void end + module RequestMethods + def response_cache_key: () -> String + end + module ResponseMethods def copy_from_cached: (Response other) -> void + + def fresh?: () -> bool + + def cache_control: () -> Array[String]? + + def vary: () -> Array[String]? + + private + + def age: () -> Integer + + def date: () -> Time end end type sessionResponseCache = Session & ResponseCache::InstanceMethods end \ No newline at end of file