class ArtirixDataModels::CachedActionAdaptor::GetFull
Attributes
dao_name[R]
model[R]
Public Class Methods
new(dao_name:, model:, **extra_options)
click to toggle source
Calls superclass method
ArtirixDataModels::CachedActionAdaptor::new
# File lib/artirix_data_models/cached_action_adaptor/get_full.rb, line 5 def initialize(dao_name:, model:, **extra_options) @dao_name = dao_name @model = model super(**extra_options) end
Private Instance Methods
cache_result(result)
click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_full.rb, line 13 def cache_result(result) cache_write result if no_timestamp_mode? reload_cache_key_and_options # new cache key with the timestamp if no_timestamp_mode? logger.warn "IN NO TIMESTAMP MODE ON A GetFull after Reload Cache Key! #{dao_name}" else cache_write result end end end
load_cache_key()
click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_full.rb, line 26 def load_cache_key if no_timestamp_mode? WithoutTimestamp.cache_key_from_model model else WithTimestamp.cache_key_from_model model end end
load_cache_options()
click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_full.rb, line 34 def load_cache_options if no_timestamp_mode? WithoutTimestamp.cache_options dao_name else WithTimestamp.cache_options dao_name end end
no_timestamp_mode?()
click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_full.rb, line 48 def no_timestamp_mode? return @no_timestamp_mode unless @no_timestamp_mode.nil? @no_timestamp_mode = model.try(:_timestamp).blank? end
reload_cache_key_and_options()
click to toggle source
# File lib/artirix_data_models/cached_action_adaptor/get_full.rb, line 42 def reload_cache_key_and_options @cache_key = nil @cache_options = nil @no_timestamp_mode = nil end