add dom template to cache