Class: ConvenientService::Support::Cache Private
- Inherits:
-
Object
- Object
- ConvenientService::Support::Cache
- Defined in:
- lib/convenient_service/support/cache.rb,
lib/convenient_service/support/cache/constants.rb,
lib/convenient_service/support/cache/exceptions.rb,
lib/convenient_service/support/cache/entities/key.rb,
lib/convenient_service/support/cache/entities/caches/base.rb,
lib/convenient_service/support/cache/entities/caches/hash.rb,
lib/convenient_service/support/cache/entities/caches/array.rb,
lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb,
lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb,
lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: Constants, Entities, Exceptions
Class Method Summary collapse
- .backed_by(backend) ⇒ Class<ConvenientService::Support::Cache::Entities::Caches::Base> private
- .new ⇒ ConvenientService::Support::Cache::Entities::Caches::Base private
Class Method Details
.backed_by(backend) ⇒ Class<ConvenientService::Support::Cache::Entities::Caches::Base>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/convenient_service/support/cache.rb', line 27 def backed_by(backend) case backend when Constants::Backends::ARRAY Entities::Caches::Array when Constants::Backends::HASH Entities::Caches::Hash when Constants::Backends::THREAD_SAFE_ARRAY Entities::Caches::ThreadSafeArray when Constants::Backends::THREAD_SAFE_HASH Entities::Caches::ThreadSafeHash else ::ConvenientService.raise Exceptions::NotSupportedBackend.new(backend: backend) end end |
.new ⇒ ConvenientService::Support::Cache::Entities::Caches::Base
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/convenient_service/support/cache.rb', line 19 def new(...) backed_by(Constants::Backends::DEFAULT).new(...) end |