'Remove attribute from cache
Args:
key (str): A cleaned key string
category (str or None): A cleaned category name'

def _delcache(self, key, category):

    catkey = ('-%s' % category)
    if key:
        cachekey = ('%s-%s' % (key, category))
        self._cache.pop(cachekey, None)
    else:
        self._cache = {key: attrobj for (key, attrobj) in self._cache.items() if (not key.endswith(catkey))}
    self._catcache.pop(catkey, None)
    self._cache_complete = False
