Skip to content

Commit

Permalink
race_condition_ttl should be an integer
Browse files Browse the repository at this point in the history
  • Loading branch information
makeable committed Jan 17, 2012
1 parent 4280b20 commit 06ea1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def fetch(name, options = nil)
end
end
if entry && entry.expired?
race_ttl = options[:race_condition_ttl].to_f
race_ttl = options[:race_condition_ttl].to_i
if race_ttl and Time.now.to_f - entry.expires_at <= race_ttl
entry.expires_at = Time.now + race_ttl
write_entry(key, entry, :expires_in => race_ttl * 2)
Expand Down

0 comments on commit 06ea1ba

Please sign in to comment.