Sha256: 42fc98ede75af78ccc7e3e29e5357dc4a1da75fd0420dae53050a2cfe84a2d3e
Contents?: true
Size: 774 Bytes
Versions: 13
Compression:
Stored size: 774 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Common module Plugins module CachesReturnValue class Middleware < Core::MethodChainMiddleware ## # @param args [Array] # @param kwargs [Hash] # @param block [Proc] # @return [Object] Can be any type. # def next(*args, **kwargs, &block) key = cache.keygen(:return_values, method, *args, **kwargs, &block) cache.fetch(key) { chain.next(*args, **kwargs, &block) } end private ## # @return [ConvenientService::Support::Cache] # def cache @cache ||= entity.internals.cache end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems