You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: restore_cached_data.rb
    path of file: ./repos/shrine/lib/shrine/plugins
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Shrine
  module Plugins
    # 
    
        def cached(value, **options)
          cached_file = super

          # TODO: Remove this conditional when we remove the versions plugin
          if cached_file.is_a?(Hash) || cached_file.is_a?(Array)
            uploaded_file(cached_file) { |file| file.refresh_metadata!(**context, **options) }
          else
            cached_file.refresh_metadata!(**context, **options)
          end