Class: ButterCMS::DataStoreAdapters::RedisSSL
- Inherits:
-
Object
- Object
- ButterCMS::DataStoreAdapters::RedisSSL
- Defined in:
- lib/buttercms/data_store_adapters/redis_ssl.rb
Instance Method Summary collapse
- #get(key) ⇒ Object
-
#initialize(options) ⇒ RedisSSL
constructor
A new instance of RedisSSL.
- #set(key, value) ⇒ Object
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() redis_url = .first ssl_params = .second && Hash[.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 |