lib/autobots/helpers/caching.rb in autobots-0.2.1 vs lib/autobots/helpers/caching.rb in autobots-0.2.2

- old
+ new

@@ -24,9 +24,15 @@ identifiers = objects.inject({}) do |acc, obj| acc[key_proc.call(obj, self)] = obj acc end + if options[:force_reload] + identifiers.each do |key, _| + cache.delete key + end + end + # misses: { key => obj } @data = BulkCacheFetcher.new(cache).fetch(identifiers) do |misses| roll_out(misses.values) end else \ No newline at end of file