def METHOD_NAME(cls, module, *names, **kwargs):
    if not names:
        return
    (cls.query
     .filter(cls.name.in_(names), cls.module == module)
     .filter_by(**kwargs)
     .METHOD_NAME(synchronize_session='fetch'))
    db.session.flush()
    cls._clear_cache()