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 = get) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/shrine/plugins/kithe_multi_cache.rb', line 39

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