Sha256: bbd8d34d172c0504b8a1d28ac157d482e5a0981bfe0c883bf822f672b5667f95

Contents?: true

Size: 309 Bytes

Versions: 34

Compression:

Stored size: 309 Bytes

Contents

module Typhoeus
  class Hydra
    module Cacheable
      def add(request)
        if request.cacheable? && response = Typhoeus::Config.cache.get(request)
          response.cached = true
          request.finish(response)
          dequeue
        else
          super
        end
      end
    end
  end
end

Version data entries

34 entries across 33 versions & 7 rubygems

Version Path
talon_one-2.0.0 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
talon_one-2.0.0 vendor/bundle/ruby/2.7.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.13 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.49.9 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.44.4 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.0/lib/typhoeus/hydra/cacheable.rb
approveapi-1.0.8 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
approveapi-1.0.5 vendor/bundle/ruby/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus/hydra/cacheable.rb
typhoeus-1.3.1 lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.30.7 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.0/lib/typhoeus/hydra/cacheable.rb
color_me_shop-1.0.0 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.3.0/lib/typhoeus/hydra/cacheable.rb
cloudsmith-api-0.21.4 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.0/lib/typhoeus/hydra/cacheable.rb
typhoeus-1.3.0 lib/typhoeus/hydra/cacheable.rb
typhoeus-1.1.2 lib/typhoeus/hydra/cacheable.rb
typhoeus-1.1.1 lib/typhoeus/hydra/cacheable.rb