Sha256: d4fc4459a6439287f6817b99101d5f5b594036c94b9971160a5389f7231070ed
Contents?: true
Size: 419 Bytes
Versions: 26
Compression:
Stored size: 419 Bytes
Contents
module WCC module Media module Cacheable def cache_key return @cache_key if @cache_key key = (headers&.fetch('Etag', nil) if respond_to?(:headers)) key ||= WCC::Media::Cacheable.hash_cache_key(raw) @cache_key = "#{self.class.name}/#{key}" end def self.hash_cache_key(hash) Digest::SHA1.hexdigest(Marshal.dump(hash)) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems