def flush_cache(**kwargs):
    def class_hierarchy(clslist):
        """Recursively yield a class hierarchy"""
        for cls in clslist:
            subclass_list = cls.__subclasses__()
            if subclass_list:
                for subcls in class_hierarchy(subclass_list):
                    yield subcls
            else:
                yield cls

    for cls in class_hierarchy([SharedMemoryModel]):
        cls.flush_instance_cache()
    # run the python garbage collector
    return gc.collect()
#request_finished.connect(flush_cache)
Flush idmapper cache. When doing so the cache will
dataset/ETHPy150Open evennia/evennia/evennia/utils/idmapper/models.py/flush_cache