Class: ArtirixCacheService::Service
- Inherits:
-
Object
- Object
- ArtirixCacheService::Service
- Defined in:
- lib/artirix_cache_service/service.rb
Instance Method Summary collapse
-
#config_params ⇒ Object
Instance.
- #digest(arg) ⇒ Object
- #key(*given_args) ⇒ Object
- #key_prefix ⇒ Object
Instance Method Details
#config_params ⇒ Object
Instance
4 5 6 |
# File 'lib/artirix_cache_service/service.rb', line 4 def config_params @config_params ||= { key_prefix: nil } end |
#digest(arg) ⇒ Object
16 17 18 |
# File 'lib/artirix_cache_service/service.rb', line 16 def digest(arg) Digest::SHA1.hexdigest arg.to_s end |
#key(*given_args) ⇒ Object
12 13 14 |
# File 'lib/artirix_cache_service/service.rb', line 12 def key(*given_args) Key.new(given_args, self).call end |
#key_prefix ⇒ Object
8 9 10 |
# File 'lib/artirix_cache_service/service.rb', line 8 def key_prefix config_params[:key_prefix] end |