mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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`.
This commit is contained in:
parent
27cc32f43e
commit
f484bb068b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue