aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache.rb
diff options
context:
space:
mode:
authorJade Tucker <jadeatucker@gmail.com>2013-07-07 15:50:22 -0700
committerJade Tucker <jadeatucker@gmail.com>2013-07-07 15:50:22 -0700
commitcad2c8f5791d5bd4af0f240d96e00bae76eabd2f (patch)
tree56971a251cc37dc58ab0d6ae51317dfd1ee4999d /activesupport/lib/active_support/cache.rb
parentb18a27375a62b7c9848cd2dc7b5cf152ef61b62f (diff)
downloadrails-cad2c8f5791d5bd4af0f240d96e00bae76eabd2f.tar.gz
rails-cad2c8f5791d5bd4af0f240d96e00bae76eabd2f.tar.bz2
rails-cad2c8f5791d5bd4af0f240d96e00bae76eabd2f.zip
cache.exists? should return true/false
Diffstat (limited to 'activesupport/lib/active_support/cache.rb')
-rw-r--r--activesupport/lib/active_support/cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index c539048a85..308a1b2cd9 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -408,7 +408,7 @@ module ActiveSupport
options = merged_options(options)
instrument(:exist?, name) do
entry = read_entry(namespaced_key(name, options), options)
- entry && !entry.expired?
+ (entry && !entry.expired?) || false
end
end