1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #22193 from grosser/grosser/multi

call local_cache 1 time instead of 3 times
This commit is contained in:
Eileen M. Uchitelle 2015-11-06 15:56:01 -05:00
commit f036eacd6c

View file

@ -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