lib/wcc/media/cacheable.rb in wcc-media-client-0.4.15 vs lib/wcc/media/cacheable.rb in wcc-media-client-0.5.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module WCC module Media module Cacheable def cache_key return @cache_key if @cache_key @@ -15,13 +17,13 @@ last_modified = (headers&.fetch('Last-Modified', nil) if respond_to?(:headers)) @last_modified = Time.parse(last_modified) if last_modified && /\S/.match(last_modified) end - alias_method :updated_at, :last_modified + alias updated_at last_modified def self.hash_cache_key(hash) Digest::SHA1.hexdigest(Marshal.dump(hash)) end end end -end \ No newline at end of file +end