lib/routemaster/jobs/cache_and_sweep.rb in routemaster-drain-2.2.2 vs lib/routemaster/jobs/cache_and_sweep.rb in routemaster-drain-2.3.0
- old
+ new
@@ -6,10 +6,13 @@
# Caches a URL using {Cache}, and sweeps the dirty map
# if sucessful.
class CacheAndSweep
def perform(url)
Dirty::Map.new.sweep_one(url) do
- Cache.new.get(url)
+ begin
+ Cache.new.get(url)
+ rescue Errors::ResourceNotFound
+ end
end
end
end
end
end