class Pundit::CacheStore::LegacyStore
@api private
The original cache mechanism used by Pundit.
A cache store that uses only the record as a cache key, and ignores the user.
def fetch(user:, record:)
- Note: - `nil` results are not cached.
def fetch(user:, record:) _ = user @store[record] ||= yield end
def initialize(hash = {})
def initialize(hash = {}) @store = hash end