Skip to content

Commit

Permalink
cache.exists? should return true/false
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeatucker committed Jul 7, 2013
1 parent b18a273 commit cad2c8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cad2c8f

Please sign in to comment.