Sha256: d37cdf079063b4ef94826e464fc54a994cb7bb4a1f14c16ada53d791def0951f

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Common
    module Plugins
      module HasInternals
        module Entities
          class Internals
            module Plugins
              ##
              # @internal
              #   TODO: Consider to refactor into common plugin?
              #
              module HasCache
                module Concern
                  include Support::Concern

                  class_methods do
                    ##
                    # @return [ConvenientService::Support::Cache]
                    #
                    # @internal
                    #   TODO: `Support::Cache.create(backend: :thread_safe_hash)`.
                    #
                    def cache
                      @cache ||= Support::Cache.create(backend: :hash)
                    end
                  end

                  instance_methods do
                    ##
                    # @return [ConvenientService::Support::Cache]
                    #
                    def cache
                      @cache ||= Support::Cache.create(backend: :hash)
                    end
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb
convenient_service-0.19.0 lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb
convenient_service-0.18.0 lib/convenient_service/common/plugins/has_internals/entities/internals/plugins/has_cache/concern.rb