Class: AnyCache::Adapters::ActiveSupportNaiveStore::Persist Private
- Defined in:
- lib/any_cache/adapters/active_support_naive_store/persist.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.
Direct Known Subclasses
AnyCache::Adapters::ActiveSupportFileStore::Persist, AnyCache::Adapters::ActiveSupportMemoryStore::Persist
Constant Summary
Constants inherited from Operation
Operation::DEAD_TTL, Operation::NO_EXPIRATION_TTL, Operation::READ_MULTI_EMPTY_KEYS_SET
Instance Method Summary collapse
Methods inherited from Operation
Constructor Details
This class inherits a constructor from AnyCache::Adapters::ActiveSupportNaiveStore::Operation
Instance Method Details
#call(key) ⇒ void
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.
This method returns an undefined value.
12 13 14 15 16 |
# File 'lib/any_cache/adapters/active_support_naive_store/persist.rb', line 12 def call(key) fetch_entry(key).tap do |entry| write(key, entry.value, expires_in: NO_EXPIRATION_TTL) if entry end end |
#fetch_entry(key) ⇒ NilClass, ActiveSupport::Cache::Entry
|
# File 'lib/any_cache/adapters/active_support_naive_store/persist.rb', line 18
|