Class: ActiveSupport::Cache::EncryptedRedisCacheStore

Inherits:
RedisCacheStore
  • Object
show all
Defined in:
lib/active_support/cache/encrypted_redis_cache_store.rb

Constant Summary collapse

VERSION =
'0.1.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(encryptor_key: nil, **options) ⇒ EncryptedRedisCacheStore

Returns a new instance of EncryptedRedisCacheStore.



15
16
17
18
19
20
21
22
23
# File 'lib/active_support/cache/encrypted_redis_cache_store.rb', line 15

def initialize(encryptor_key: nil, **options)
  @encryptor_key = encryptor_key

  unless encryptor_key
    raise ArgumentError, 'missing :encryptor_key option. Please generate encryptor_key `ActiveSupport::EncryptedFile.generate_key`'
  end

  super(**options)
end

Instance Attribute Details

#encryptor_keyObject (readonly)

Returns the value of attribute encryptor_key.



13
14
15
# File 'lib/active_support/cache/encrypted_redis_cache_store.rb', line 13

def encryptor_key
  @encryptor_key
end