Sha256: 2bb759e4d3469a79be282e0385b56928cea9d5ce9edd6256eddf92d14d7a9412

Contents?: true

Size: 1.35 KB

Versions: 8

Compression:

Stored size: 1.35 KB

Contents

module HTTPX
  module Plugins
    module ResponseCache
      CACHEABLE_VERBS: Array[verb]

      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[String, Array[Response]] & Mutex_m

        def lookup: (Request request) -> Response?

        def cached?: (Request request) -> boolish

        def cache: (Request request, Response response) -> void

        def prepare: (Request request) -> void

        private

        def match_by_vary?: (Request request, Response response) -> bool

        def _get: (Request request) -> Array[Response]?

        def _set: (Request request, Response response) -> void
      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
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
httpx-0.24.7 sig/plugins/response_cache.rbs
httpx-0.24.6 sig/plugins/response_cache.rbs
httpx-0.24.5 sig/plugins/response_cache.rbs
httpx-0.24.4 sig/plugins/response_cache.rbs
httpx-0.24.3 sig/plugins/response_cache.rbs
httpx-0.24.2 sig/plugins/response_cache.rbs
httpx-0.24.1 sig/plugins/response_cache.rbs
httpx-0.24.0 sig/plugins/response_cache.rbs