Merge pull request #22193 from grosser/grosser/multi
call local_cache 1 time instead of 3 times
This commit is contained in:
commit
f036eacd6c
|
@ -102,10 +102,10 @@ module ActiveSupport
|
|||
|
||||
protected
|
||||
def read_entry(key, options) # :nodoc:
|
||||
if local_cache
|
||||
local_cache.fetch(key) do
|
||||
if cache = local_cache
|
||||
cache.fetch(key) do
|
||||
entry = super
|
||||
local_cache.write_entry(key, entry, options)
|
||||
cache.write_entry(key, entry, options)
|
||||
entry
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue