Class: SmartCollection::CacheManager
- Inherits:
-
Object
- Object
- SmartCollection::CacheManager
show all
- Defined in:
- lib/smart_collection/cache_manager.rb,
lib/smart_collection/cache_manager/table.rb,
lib/smart_collection/cache_manager/cache_store.rb
Defined Under Namespace
Classes: CacheStore, Table
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(model:, config:) ⇒ CacheManager
Returns a new instance of CacheManager.
13
14
15
16
|
# File 'lib/smart_collection/cache_manager.rb', line 13
def initialize model:, config:
@model = model
@config = config
end
|
Class Method Details
.determine_class(config) ⇒ Object
Instance Method Details
#cache_exists?(owner) ⇒ Boolean
26
27
28
|
# File 'lib/smart_collection/cache_manager.rb', line 26
def cache_exists? owner
raise NotImplementedError
end
|
#expires_in ⇒ Object
30
31
32
|
# File 'lib/smart_collection/cache_manager.rb', line 30
def expires_in
@config.cache_config[:expires_in] || 1.hour
end
|
#read_scope(owner) ⇒ Object
22
23
24
|
# File 'lib/smart_collection/cache_manager.rb', line 22
def read_scope owner
raise NotImplementedError
end
|
#update(owner) ⇒ Object
18
19
20
|
# File 'lib/smart_collection/cache_manager.rb', line 18
def update owner
raise NotImplementedError
end
|