Controlling double-cavity optical switching in a K-type multilevel system including spontaneously generated coherence