module Prefetcher

Constants

VERSION

Public Class Methods

redis_connection() click to toggle source
# File lib/prefetcher.rb, line 19
def self.redis_connection
  @redis_connection ||= Redis.new
end
redis_connection=(conn) click to toggle source
# File lib/prefetcher.rb, line 23
def self.redis_connection=(conn)
  @redis_connection = conn
end
update_all(options = {}) click to toggle source

Updates all memoized requests

# File lib/prefetcher.rb, line 13
def self.update_all(options = {})
  HttpMemoizer.new(options).get_list.each do |url|
    HttpFetcher.new(options.merge(url: url)).fetch
  end
end