

def _recache(self):
    '\n        Cache all tags of this object.\n\n        '
    query = {
        ('%s__id' % self._model): self._objid,
        'tag__db_tagtype': self._tagtype,
    }
    tagobjs = [conn.tag for conn in getattr(self.obj, self._m2m_fieldname).through.objects.filter(**query)]
    self._cache = dict(((('%s-%s' % (to_str(tagobj.db_key).lower(), (tagobj.db_category.lower() if tagobj.db_category else None))), tagobj) for tagobj in tagobjs))

dataset/ETHPy150Open evennia/evennia/evennia/typeclasses/tags.py TagHandler._recache/original