aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorMichael Grosser <michael@grosser.it>2015-11-05 17:43:22 -0800
committerMichael Grosser <michael@grosser.it>2015-11-05 17:47:40 -0800
commitb9fb0f262371a668865d0987585933add7085670 (patch)
tree3ab95fc61d6377ae3f80969de7be3c2a2ce6c16c /activesupport/test
parent07b2ff03d04656faccc68c83541b06e318a36ed7 (diff)
downloadrails-b9fb0f262371a668865d0987585933add7085670.tar.gz
rails-b9fb0f262371a668865d0987585933add7085670.tar.bz2
rails-b9fb0f262371a668865d0987585933add7085670.zip
cache nil replies from backend cache so misses are fast too
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/caching_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index 74ceff44f9..44e0eb9764 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -597,6 +597,14 @@ module LocalCacheBehavior
end
end
+ def test_local_cache_of_read_nil
+ @cache.with_local_cache do
+ assert_equal nil, @cache.read('foo')
+ @cache.send(:bypass_local_cache) { @cache.write 'foo', 'bar' }
+ assert_equal nil, @cache.read('foo')
+ end
+ end
+
def test_local_cache_of_write_nil
@cache.with_local_cache do
assert @cache.write('foo', nil)