class ArtirixDataModels::CachedActionAdaptor::GetSome

Attributes

dao_name[R]
model_pks[R]

Public Class Methods

new(dao_name:, model_pks:, **extra_options) click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_some.rb, line 5
def initialize(dao_name:, model_pks:, **extra_options)
  @dao_name  = dao_name
  @model_pks = Array(model_pks)

  super(**extra_options)
end

Public Instance Methods

load_cache_key() click to toggle source
# 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() click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_some.rb, line 16
def load_cache_options
  ArtirixDataModels::CacheService.first_options "dao_#{dao_name}_get_some_options",
                                                "dao_#{dao_name}_options",
                                                'dao_get_some_options',
                                                return_if_missing: :default
end