We report detailed measurements of the relaxation and dephasing time in a flux-qubit measured by a switching DC SQUID. We studied their dependence on the two important circuit bias parameters: the externally applied magnetic flux and the bias current through the SQUID in two samples. We demonstrate two complementary strategies to protect the qubit from these decoherence sources. One consists in biasing the qubit so that its resonance frequency is stationary with respect to the control parameters ({it optimal point}) ; the second consists in {it decoupling} the qubit from current noise by chosing a proper bias current through the SQUID. At the decoupled optimal point, we measured long spin-echo decay times of up to $4 mu s$.