Permalink
Browse files

cache.exists? should return true/false

  • Loading branch information...
1 parent b18a273 commit cad2c8f5791d5bd4af0f240d96e00bae76eabd2f @jadeatucker jadeatucker committed Jul 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/cache.rb
@@ -408,7 +408,7 @@ def exist?(name, options = nil)
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

0 comments on commit cad2c8f

Please sign in to comment.