From f484bb068bd7f023c87445a8d063a40142805613 Mon Sep 17 00:00:00 2001 From: Dimitris Zorbas Date: Mon, 6 Jun 2016 09:13:49 +0300 Subject: [PATCH] Change doc for race_condition_ttl option of ActiveSupport::Cache::Store#fetch [ci skip] The related option of this method, `expires_in` is documented as expecting an `ActiveSupport::Duration` value. To minimize any sort of ambiguity between duration options, this change also documents `race_condition_ttl` accepting `ActiveSupport::Duration`. --- activesupport/lib/active_support/cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index bc114e0785..179ca13b49 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -250,14 +250,14 @@ module ActiveSupport # sleep 60 # # Thread.new do - # val_1 = cache.fetch('foo', race_condition_ttl: 10) do + # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do # sleep 1 # 'new value 1' # end # end # # Thread.new do - # val_2 = cache.fetch('foo', race_condition_ttl: 10) do + # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do # 'new value 2' # end # end