# File lib/rubyrep/connection_extenders/connection_extenders.rb, line 133
    def self.db_connect(config)
      if not use_cache?
        db_connection = db_connect_without_cache config
      else
        config_dump = Marshal.dump config.reject {|key, | [:proxy_host, :proxy_port, :logger].include? key}
        config_checksum = Digest::SHA1.hexdigest(config_dump)
        @@connection_cache ||= {}

        db_connection = connection_cache[config_checksum]
        unless db_connection and db_connection.active?
          db_connection = db_connect_without_cache config
          connection_cache[config_checksum] = db_connection
        end
      end

      install_logger db_connection, config

      db_connection
    end