Module: Shrine::Plugins::Recache::AttacherMethods

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

Instance Method Summary collapse

Instance Method Details

#recacheObject


15
16
17
18
19
20
21
# File 'lib/shrine/plugins/recache.rb', line 15

def recache
  if cached?
    result = upload(file, cache_key, action: :recache)

    set(result)
  end
end

#saveObject


10
11
12
13
# File 'lib/shrine/plugins/recache.rb', line 10

def save
  recache
  super
end