    # File lib/active_support/vendor/memcache-client-1.5.0/memcache.rb, line 540
      def get_server_for_key(key)
        raise ArgumentError, "illegal character in key #{key.inspect}" if
          key =~ /\s/
        raise ArgumentError, "key too long #{key.inspect}" if key.length > 250
        raise MemCacheError, "No servers available" if @servers.empty?
        return @servers.first if @servers.length == 1

        hkey = hash_for key

        20.times do |try|
          server = @buckets[hkey % @buckets.nitems]
          return server if server.alive?
          hkey += hash_for "#{try}#{key}"
        end

        raise MemCacheError, "No servers available"
      end