race_condition_ttl should be an integer

This commit is contained in:
Matt Williams 2012-01-17 13:54:09 +01:00
parent 4280b20cde
commit 06ea1bad55

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