add dns cache logic