mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
no need to assign if we are gonna return
This commit is contained in:
parent
06dc884454
commit
1ee3593d65
1 changed files with 2 additions and 2 deletions
|
@ -113,10 +113,10 @@ module ActionDispatch
|
|||
DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate"
|
||||
|
||||
def set_conditional_cache_control!
|
||||
control = @cache_control
|
||||
|
||||
return if self["Cache-Control"].present?
|
||||
|
||||
control = @cache_control
|
||||
|
||||
if control.empty?
|
||||
headers["Cache-Control"] = DEFAULT_CACHE_CONTROL
|
||||
elsif @cache_control[:no_cache]
|
||||
|
|
Loading…
Reference in a new issue