Sha256: bbef11405ecfa6d712b8e5d59a70ac959e2047f655934f388befb81cc8edec2d
Contents?: true
Size: 650 Bytes
Versions: 36
Compression:
Stored size: 650 Bytes
Contents
require 'net/http' class HttpEvictCache < Filbunke::Callbacks def on_update(file, local_file_path) begin evict_http = Net::HTTP.new(@config["host"], @config["port"].to_i) evict_http.start do |http| evict_path = "/cache/evict/#{file.path.chomp('.yml')}" request = Net::HTTP::Get.new(evict_path) response = http.request(request) if response.code.to_i != 200 @logger.log "Failed to evict cache entry: #{file.path}" end end rescue StandardError => e @logger.log("Failed to evict cache entry: #{file.path}") @logger.log(e.backtrace.join("\n")) end end end
Version data entries
36 entries across 36 versions & 1 rubygems