Class: CMSScanner::Cache::Typhoeus
- Defined in:
- lib/cms_scanner/cache/typhoeus.rb
Overview
Cache implementation for Typhoeus
Instance Attribute Summary
Attributes inherited from FileStore
Instance Method Summary collapse
Methods inherited from FileStore
#clean, #entry_expiration_path, #entry_path, #initialize, #read_entry, #write_entry
Constructor Details
This class inherits a constructor from CMSScanner::Cache::FileStore
Instance Method Details
#get(request) ⇒ Typhoeus::Response
12 13 14 |
# File 'lib/cms_scanner/cache/typhoeus.rb', line 12 def get(request) read_entry(request.hash.to_s) end |
#set(request, response) ⇒ Object
18 19 20 21 22 |
# File 'lib/cms_scanner/cache/typhoeus.rb', line 18 def set(request, response) return if response.timed_out? || response.code&.zero? write_entry(request.hash.to_s, response, request.cache_ttl) end |