Class: ArtirixCacheService::VariablesStores::Redis

Inherits:
Base
  • Object
show all
Defined in:
lib/artirix_cache_service/variables_stores/redis.rb

Constant Summary collapse

EMPTY_STRING =
''.freeze
WILDCARD =
'*'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#variable_get, #variable_set

Constructor Details

#initialize(redis_variable_prefix, redis_options = {}) ⇒ Redis

Returns a new instance of Redis.



14
15
16
17
# File 'lib/artirix_cache_service/variables_stores/redis.rb', line 14

def initialize(redis_variable_prefix, redis_options = {})
  @redis_variable_prefix = redis_variable_prefix
  @redis_options         = redis_options
end

Instance Attribute Details

#redis_variable_prefixObject (readonly)

Returns the value of attribute redis_variable_prefix.



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

def redis_variable_prefix
  @redis_variable_prefix
end

Instance Method Details

#typeObject



10
11
12
# File 'lib/artirix_cache_service/variables_stores/redis.rb', line 10

def type
  :redis
end

#variablesObject



19
20
21
# File 'lib/artirix_cache_service/variables_stores/redis.rb', line 19

def variables
  list.map { |key| clean_listed_variable key }
end