Class: ButterCMS::DataStoreAdapters::RedisSSL

Inherits:
Object
  • Object
show all
Defined in:
lib/buttercms/data_store_adapters/redis_ssl.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ RedisSSL

Returns a new instance of RedisSSL.



11
12
13
14
15
16
# File 'lib/buttercms/data_store_adapters/redis_ssl.rb', line 11

def initialize(options)
  redis_url = options.first
  ssl_params = options.second && Hash[options.second]

  @redis = ::Redis.new(url: redis_url, ssl_params:)
end

Instance Method Details

#get(key) ⇒ Object



22
23
24
# File 'lib/buttercms/data_store_adapters/redis_ssl.rb', line 22

def get(key)
  @redis.get(key)
end

#set(key, value) ⇒ Object



18
19
20
# File 'lib/buttercms/data_store_adapters/redis_ssl.rb', line 18

def set(key, value)
  @redis.set(key, value)
end