Skip to content

Commit

Permalink
no need to assign if we are gonna return
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Aug 11, 2010
1 parent ff760dd commit bfd7281
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_dispatch/http/cache.rb
Expand Up @@ -113,10 +113,10 @@ def string_body?
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]
Expand Down

0 comments on commit bfd7281

Please sign in to comment.