added caching subtemplates