'Update cache.
Args:
key (str): A cleaned key string
category (str or None): A cleaned category name
tag_obj (tag): The newly saved tag'

def _setcache(self, key, category, tag_obj):

    if (not key):
        return
    (key, category) = (key.strip().lower(), (category.strip().lower() if category else category))
    cachekey = ('%s-%s' % (key, category))
    catkey = ('-%s' % category)
    self._cache[cachekey] = tag_obj
    self._catcache.pop(catkey, None)
    self._cache_complete = False
