mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
no need to assign if we are gonna return
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user