added cache to template fragments