Sha256: 515612b89a850ad8cc087afaab9a830ed9c92e3b14fa8abe20c8c6b3ed474a07
Contents?: true
Size: 283 Bytes
Versions: 1
Compression:
Stored size: 283 Bytes
Contents
# frozen_string_literal: true require 'digest' module ActiveMemoize module Shared def cache @cache ||= {} end def key(method_name, method_args) method_md5 = Digest::MD5.hexdigest(method_args.to_s) "#{method_name}:#{method_md5}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_memoize-2.0.1 | lib/active_memoize/shared.rb |