feat(templateCache) added function to generate template