Class: Routemaster::Jobs::CacheAndSweep

Inherits:
Object
  • Object
show all
Defined in:
lib/routemaster/jobs/cache_and_sweep.rb

Overview

Caches a URL using Cache, and sweeps the dirty map if sucessful.

Class Method Summary collapse

Class Method Details

.perform(url) ⇒ Object



9
10
11
12
13
# File 'lib/routemaster/jobs/cache_and_sweep.rb', line 9

def self.perform(url)
  Dirty::Map.new.sweep_one(url) do
    Cache.new.get(url)
  end
end