# File lib/amazon/search/cache.rb, line 48 def cached?(url) digest = Digest::MD5.hexdigest(url) cache_files = Dir.glob(File.join(@path, '*')).map do |d| File.basename(d) end return cache_files.include?(digest) && (Time.now - File.mtime(File.join(@path, digest))) / ONE_DAY <= MAX_AGE end