class JobParser::Cache

Public Instance Methods

cache_expired?(url) click to toggle source
# File lib/jobparser/cache.rb, line 24
def cache_expired?(url)
  cache_instance.cache_expired?(url)
end
cache_instance() click to toggle source
# File lib/jobparser/cache.rb, line 4
def cache_instance
  @cache_instance || JobParser.config[:cache_storage_class].new
end
clear_all() click to toggle source
# File lib/jobparser/cache.rb, line 32
def clear_all
  cache_instance.clear_all
end
fetch_result_for_url(url) click to toggle source
# File lib/jobparser/cache.rb, line 16
def fetch_result_for_url(url)
  cache_instance.get(url)
end
has_cache_for_url?(url) click to toggle source
# File lib/jobparser/cache.rb, line 12
def has_cache_for_url?(url)
  cache_instance.has_cache_for_url?(url)
end
store_to_file(job_hash) click to toggle source
# File lib/jobparser/cache.rb, line 20
def store_to_file(job_hash)
  cache_instance.store(job_hash)
end
valid_for_url?(url) click to toggle source
# File lib/jobparser/cache.rb, line 8
def valid_for_url?(url)
  JobParser.config[:cache_on] && has_cache_for_url?(url) && !cache_expired?(url)
end
view_cache() click to toggle source
# File lib/jobparser/cache.rb, line 28
def view_cache
  cache_instance.view_cache
end