Skip to content
Browse files

Merge pull request #4496 from makeable/master

Active Support Cache - race_condition_ttl should be an integer
  • Loading branch information...
2 parents c1f4cb5 + 06ea1ba commit e539b2ad0e4e90701317c7d79a0c43e250a12dfb @tenderlove tenderlove committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/cache.rb
View
2 activesupport/lib/active_support/cache.rb
@@ -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)

0 comments on commit e539b2a

Please sign in to comment.
Something went wrong with that request. Please try again.