Module: Typhoeus::Hydra::Cacheable
- Included in:
- Typhoeus::Hydra
- Defined in:
- lib/typhoeus/hydra/cacheable.rb
Overview
Instance Method Summary collapse
Instance Method Details
#add(request) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/typhoeus/hydra/cacheable.rb', line 4 def add(request) if request.cacheable? && response = request.cached_response response.cached = true request.finish(response) dequeue else super end end |