diff options
author | Dimitris Zorbas <zorbash@skroutz.gr> | 2016-06-06 09:13:49 +0300 |
---|---|---|
committer | Dimitris Zorbas <zorbash@skroutz.gr> | 2016-06-06 09:25:18 +0300 |
commit | f484bb068bd7f023c87445a8d063a40142805613 (patch) | |
tree | 62d2eef769ae9424aafad4ab9391a03db304dd32 /activesupport | |
parent | 27cc32f43e62ee98a8bbcba9ac1b97233293dc26 (diff) | |
download | rails-f484bb068bd7f023c87445a8d063a40142805613.tar.gz rails-f484bb068bd7f023c87445a8d063a40142805613.tar.bz2 rails-f484bb068bd7f023c87445a8d063a40142805613.zip |
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`.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 4 |
1 files 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 |