no need to assign if we are gonna return

This commit is contained in:
Xavier Noria
2010-08-11 23:54:15 +02:00
parent 06dc884454
commit 1ee3593d65

View File

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