Commit 708501ea authored by Gabriel Mazetto's avatar Gabriel Mazetto

Add a short expiration time so we can use on secondary node as well

parent 9409d42f
......@@ -90,7 +90,8 @@ module Gitlab
def self.cache_value(key, &block)
return yield unless RequestStore.active?
RequestStore.fetch(key) { Rails.cache.fetch(key) { yield } }
# We need a short expire time as we can't manually expire on a secondary node
RequestStore.fetch(key) { Rails.cache.fetch(key, expires_in: 15.seconds) { yield } }
end
def self.expire_cache!
......
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