aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-12-21 10:31:03 +0100
committerYves Senn <yves.senn@gmail.com>2015-12-21 10:32:09 +0100
commite65680ee746877c9c028658c6e3c8f684c857bc9 (patch)
treee825716ac3914342efe19b5860fa3839037fc136 /activesupport
parent537ac7d6ade61e95f2b70685ff2236b7de965bab (diff)
parentff847590f30c2657994276d3e38c72ff288dc02e (diff)
downloadrails-e65680ee746877c9c028658c6e3c8f684c857bc9.tar.gz
rails-e65680ee746877c9c028658c6e3c8f684c857bc9.tar.bz2
rails-e65680ee746877c9c028658c6e3c8f684c857bc9.zip
Merge pull request #22581 from hirocaster/fix-expect-sample-code
[ci skip] Change output timming of sample code
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 8272d3395c..610105f41c 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -255,10 +255,11 @@ module ActiveSupport
# end
# end
#
- # # val_1 => "new value 1"
- # # val_2 => "original value"
- # # sleep 10 # First thread extend the life of cache by another 10 seconds
- # # cache.fetch('foo') => "new value 1"
+ # cache.fetch('foo') # => "original value"
+ # sleep 10 # First thread extended the life of cache by another 10 seconds
+ # cache.fetch('foo') # => "new value 1"
+ # val_1 # => "new value 1"
+ # val_2 # => "original value"
#
# Other options will be handled by the specific cache store implementation.
# Internally, #fetch calls #read_entry, and calls #write_entry on a cache