diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-03 10:39:51 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-03 10:39:51 -0700 |
commit | e539b2ad0e4e90701317c7d79a0c43e250a12dfb (patch) | |
tree | f4fed424dc432b607ad3fe6433467f0443d4c1aa | |
parent | c1f4cb59acad9f82ad26f8103045bcddce9ca4f4 (diff) | |
parent | 06ea1bad551badbdfb02ca7e23cb727f490a0e72 (diff) | |
download | rails-e539b2ad0e4e90701317c7d79a0c43e250a12dfb.tar.gz rails-e539b2ad0e4e90701317c7d79a0c43e250a12dfb.tar.bz2 rails-e539b2ad0e4e90701317c7d79a0c43e250a12dfb.zip |
Merge pull request #4496 from makeable/master
Active Support Cache - race_condition_ttl should be an integer
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index b9f196d7a9..55791bfa56 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -280,7 +280,7 @@ module ActiveSupport 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) |