add template cache generation