提交 e539b2ad 编写于 作者: A Aaron Patterson

Merge pull request #4496 from makeable/master

Active Support Cache - race_condition_ttl should be an integer
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册