Class: Pundit::CacheStore::NullStore Private
- Inherits:
-
Object
- Object
- Pundit::CacheStore::NullStore
- Defined in:
- lib/pundit/cache_store/null_store.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A cache store that does not cache anything.
Use ‘NullStore.instance` to get the singleton instance, it is thread-safe.
Class Attribute Summary collapse
-
.instance ⇒ NullStore
readonly
private
The singleton instance.
Instance Method Summary collapse
-
#fetch { ... } ⇒ any
private
Always yields, does not cache anything.
Class Attribute Details
.instance ⇒ NullStore (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the singleton instance.
18 19 20 |
# File 'lib/pundit/cache_store/null_store.rb', line 18 def instance @instance end |
Instance Method Details
#fetch { ... } ⇒ any
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Always yields, does not cache anything.
25 26 27 |
# File 'lib/pundit/cache_store/null_store.rb', line 25 def fetch(*, **) yield end |