Sha256: 55e65f518fa640d1baec694aa6936e0fc32732e2069bb1c8ad44142ddd0709ea

Contents?: true

Size: 299 Bytes

Versions: 53

Compression:

Stored size: 299 Bytes

Contents

# frozen_string_literal: true

require 'typhoeus'

module Kovid
  class Cache
    def initialize
      @memory = {}
    end

    def get(request)
      @memory[request]
    end

    def set(request, response)
      @memory[request] = response
    end
  end

  Typhoeus::Config.cache = Cache.new
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
kovid-0.6.5 lib/kovid/cache.rb
kovid-0.6.4 lib/kovid/cache.rb
kovid-0.6.3 lib/kovid/cache.rb
kovid-0.6.2 lib/kovid/cache.rb
kovid-0.6.1 lib/kovid/cache.rb
kovid-0.6.0 lib/kovid/cache.rb
kovid-0.5.8 lib/kovid/cache.rb
kovid-0.5.7 lib/kovid/cache.rb
kovid-0.5.6 lib/kovid/cache.rb
kovid-0.5.5 lib/kovid/cache.rb
kovid-0.5.4 lib/kovid/cache.rb
kovid-0.5.3 lib/kovid/cache.rb
kovid-0.5.2 lib/kovid/cache.rb
kovid-0.5.0 lib/kovid/cache.rb
kovid-0.4.11 lib/kovid/cache.rb
kovid-0.4.10 lib/kovid/cache.rb
kovid-0.4.9 lib/kovid/cache.rb
kovid-0.4.8 lib/kovid/cache.rb
kovid-0.4.7 lib/kovid/cache.rb
kovid-0.4.6 lib/kovid/cache.rb