Collectively, metformin combats resistant E. coli mastitis through a dual mechanism: disrupting biofilm-dependent bacterial persistence and reprogramming host immunometabolism via AMPK/SIRT1-mediated epigenetic regulation. The gene discussed is SIRT1; the disease is mastitis.