Class: ArtirixCacheService::VariablesStoreService

Inherits:
Object
  • Object
show all
Defined in:
lib/artirix_cache_service/variables_store_service.rb

Constant Summary collapse

DEFAULT_PREFIX =
'artirix_cache_service'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#redis_optionsObject



8
9
10
# File 'lib/artirix_cache_service/variables_store_service.rb', line 8

def redis_options
  @redis_options ||= {}
end

#redis_variable_prefixObject



12
13
14
# File 'lib/artirix_cache_service/variables_store_service.rb', line 12

def redis_variable_prefix
  @redis_variable_prefix ||= DEFAULT_PREFIX
end

Instance Method Details

#register_variables_store(type, force: false) ⇒ Object



16
17
18
# File 'lib/artirix_cache_service/variables_store_service.rb', line 16

def register_variables_store(type, force: false)
  @variables_store = build_by_type type, force
end

#reload_variables_storeObject



20
21
22
# File 'lib/artirix_cache_service/variables_store_service.rb', line 20

def reload_variables_store
  register_variables_store type, force: true
end

#variables_storeObject



24
25
26
# File 'lib/artirix_cache_service/variables_store_service.rb', line 24

def variables_store
  @variables_store ||= build_internal
end