'Cache Fail2Ban\'s default template.'

def _cacheTemplate(self, template):

    if isinstance(template, str):
        template = _getPatternTemplate(template)
    name = template.name
    if ((not name.startswith('{^LN-BEG}')) and (not name.startswith('^')) and hasattr(template, 'regex')):
        template2 = _getAnchoredTemplate(template)
        if (template2.name != name):
            template2.weight = 100.0
            self.__tmpcache[0].append(template2)
    self.__tmpcache[1].append(template)
