Sha256: acb43c1b4b0fb8f69164a0de4ca435114e3f7fedc101b0d2b2593c9e35614e86
Contents?: true
Size: 494 Bytes
Versions: 6
Compression:
Stored size: 494 Bytes
Contents
# frozen_string_literal: true require 'faraday' module MetalArchives module Middleware ## # Log cache status # class CacheCheck < Faraday::Response::Middleware # :nodoc: def on_complete(env) return unless MetalArchives.config.endpoint if env[:response_headers].has_key? 'x-cache-status' MetalArchives.config.logger.info "Cache #{env[:response_headers]['x-cache-status'].downcase} for #{env.url.to_s}" end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems