Commit 95b99a29 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'rc/synchronous_reactive_cache' into 'master'

Add ability to run reactive caching synchronously

See merge request gitlab-org/gitlab!20655
parents f03ce99f cd94f1c5
......@@ -122,6 +122,14 @@ module ReactiveCaching
end
end
# This method is used for debugging purposes and should not be used otherwise.
def without_reactive_cache(*args, &blk)
return with_reactive_cache(*args, &blk) unless Rails.env.development?
data = self.class.reactive_cache_worker_finder.call(id, *args).calculate_reactive_cache(*args)
yield data
end
def clear_reactive_cache!(*args)
Rails.cache.delete(full_reactive_cache_key(*args))
Rails.cache.delete(alive_reactive_cache_key(*args))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment