exist?(name, options = nil)
public
Returns true if the cache contains an entry for the given key.
Options are passed to the underlying cache implementation.
# File activesupport/lib/active_support/cache.rb, line 702
def exist?(name, options = nil)
options = merged_options(options)
instrument(:exist?, name) do |payload|
entry = read_entry(normalize_key(name, options), **options, event: payload)
(entry && !entry.expired? && !entry.mismatched?(normalize_version(name, options))) || false
end
end