Sha256: adb6de52054186b4b208ae6a8ebb0ce27e7d314ed2bf62e595c62717b0ddb26d

Contents?: true

Size: 276 Bytes

Versions: 3

Compression:

Stored size: 276 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
typhoeus-0.6.6 lib/typhoeus/hydra/cacheable.rb
typhoeus-0.6.5 lib/typhoeus/hydra/cacheable.rb
typhoeus-0.6.4 lib/typhoeus/hydra/cacheable.rb