Save some allocations in ActionView digest
This commit is contained in:
parent
3803671a81
commit
ecbde46a40
@ -17,7 +17,8 @@ def digest(name:, format: nil, finder:, dependencies: nil)
|
||||
if dependencies.nil? || dependencies.empty?
|
||||
cache_key = "#{name}.#{format}"
|
||||
else
|
||||
cache_key = [ name, format, dependencies ].flatten.compact.join(".")
|
||||
dependencies_suffix = dependencies.flatten.tap(&:compact!).join(".")
|
||||
cache_key = "#{name}.#{format}.#{dependencies_suffix}"
|
||||
end
|
||||
|
||||
# this is a correctly done double-checked locking idiom
|
||||
|
Loading…
Reference in New Issue
Block a user