Class: ArtirixDataModels::CachedActionAdaptor::GetSome
- Inherits:
-
ArtirixDataModels::CachedActionAdaptor
- Object
- ArtirixDataModels::CachedActionAdaptor
- ArtirixDataModels::CachedActionAdaptor::GetSome
- Defined in:
- lib/artirix_data_models/cached_action_adaptor/get_some.rb
Constant Summary
Constants inherited from ArtirixDataModels::CachedActionAdaptor
STATUSES, STATUS_NOT_FOUND, STATUS_OK
Instance Attribute Summary collapse
-
#dao_name ⇒ Object
readonly
Returns the value of attribute dao_name.
-
#model_pks ⇒ Object
readonly
Returns the value of attribute model_pks.
Attributes inherited from ArtirixDataModels::CachedActionAdaptor
Instance Method Summary collapse
-
#initialize(dao_name:, model_pks:, **extra_options) ⇒ GetSome
constructor
A new instance of GetSome.
- #load_cache_key ⇒ Object
- #load_cache_options ⇒ Object
Methods inherited from ArtirixDataModels::CachedActionAdaptor
#cached?, #disable, #enable, #enabled?, #fetch
Constructor Details
#initialize(dao_name:, model_pks:, **extra_options) ⇒ GetSome
Returns a new instance of GetSome.
5 6 7 8 9 10 |
# File 'lib/artirix_data_models/cached_action_adaptor/get_some.rb', line 5 def initialize(dao_name:, model_pks:, **) @dao_name = dao_name @model_pks = Array(model_pks) super(**) end |
Instance Attribute Details
#dao_name ⇒ Object (readonly)
Returns the value of attribute dao_name.
3 4 5 |
# File 'lib/artirix_data_models/cached_action_adaptor/get_some.rb', line 3 def dao_name @dao_name end |
#model_pks ⇒ Object (readonly)
Returns the value of attribute model_pks.
3 4 5 |
# File 'lib/artirix_data_models/cached_action_adaptor/get_some.rb', line 3 def model_pks @model_pks end |
Instance Method Details
#load_cache_key ⇒ Object
12 13 14 |
# File 'lib/artirix_data_models/cached_action_adaptor/get_some.rb', line 12 def load_cache_key ArtirixDataModels::CacheService.key :dao_get_some, dao_name, model_pks end |
#load_cache_options ⇒ Object
16 17 18 19 20 21 |
# File 'lib/artirix_data_models/cached_action_adaptor/get_some.rb', line 16 def ArtirixDataModels::CacheService. "dao_#{dao_name}_get_some_options", "dao_#{dao_name}_options", 'dao_get_some_options', return_if_missing: :default end |