Added template-cache cleanup