Reduce Array object allocation
This commit is contained in:
parent
4e7620b110
commit
b368c68c6a
@ -138,15 +138,13 @@ def generate_strong_etag(validators)
|
||||
def cache_control_segments
|
||||
if cache_control = _cache_control
|
||||
cache_control.delete(" ").split(",")
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
def cache_control_headers
|
||||
cache_control = {}
|
||||
|
||||
cache_control_segments.each do |segment|
|
||||
cache_control_segments&.each do |segment|
|
||||
directive, argument = segment.split("=", 2)
|
||||
|
||||
if SPECIAL_KEYS.include? directive
|
||||
|
Loading…
Reference in New Issue
Block a user