Module: Shrine::Plugins::KitheMultiCache::AttacherMethods

Defined in:
lib/shrine/plugins/kithe_multi_cache.rb

Overview

override #cache to lazily extend with our custom module. Kinda hacky, but couldn’t think of any other way to only extend the “cache” uploader, and not the “store” uploader.

Instance Method Summary collapse

Instance Method Details

#cached?(file = self.file) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/shrine/plugins/kithe_multi_cache.rb', line 36

def cached?(file = self.file)
  super || (file && shrine_class.opts[:kithe_multi_cache_keys].include?(file.storage_key.to_sym))
end