class ActiveRecord::ConnectionAdapters::SchemaReflection

def load_cache(pool)

def load_cache(pool)
  # Can't load if schema dumps are disabled
  return unless possible_cache_available?
  # Check we can find one
  return unless new_cache = SchemaCache._load_from(@cache_path)
  if self.class.check_schema_cache_dump_version
    begin
      pool.with_connection do |connection|
        current_version = connection.schema_version
        if new_cache.version(connection) != current_version
          warn "Ignoring #{@cache_path} because it has expired. The current schema version is #{current_version}, but the one in the schema cache file is #{new_cache.schema_version}."
          return
        end
      end
    rescue ActiveRecordError => error
      warn "Failed to validate the schema cache because of #{error.class}: #{error.message}"
      return
    end
  end
  new_cache
end