Line length would not matter as much if the kegerator has flow control taps, but without flow control taps 2-3m would best suit,its all about
balancing your co2 pressure with keeping carbonation in the keg and flow rate through the tap so there isn't too much foam,i find too much
foam usually...