Conditional template cache to not cache error msgs