Sha256: 0b90cc19ddab3df18084663cdcb3d2dc1aaa76e6db4cf1d2424680133fb2c5f6

Contents?: true

Size: 335 Bytes

Versions: 6

Compression:

Stored size: 335 Bytes

Contents

require 'routemaster/cache'
require 'routemaster/dirty/map'

module Routemaster
  module Jobs
    # Caches a URL using {Cache}, and sweeps the dirty map
    # if sucessful.
    class CacheAndSweep
      def self.perform(url)
        Dirty::Map.new.sweep_one(url) do
          Cache.new.get(url)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
routemaster-drain-1.0.5 lib/routemaster/jobs/cache_and_sweep.rb
routemaster-drain-1.0.4 lib/routemaster/jobs/cache_and_sweep.rb
routemaster-drain-1.0.3 lib/routemaster/jobs/cache_and_sweep.rb
routemaster-drain-1.0.2 lib/routemaster/jobs/cache_and_sweep.rb
routemaster-drain-1.0.1 lib/routemaster/jobs/cache_and_sweep.rb
routemaster-drain-1.0.0 lib/routemaster/jobs/cache_and_sweep.rb