@db.listens_for(db.Session, "after_commit")
def execute_purge(config, session):
    purges = session.info.pop("warehouse.cache.origin.purges", set())

    try:
        cacher_factory = config.find_service_factory(IOriginCache)
    except __HOLE__:
        return

    cacher = cacher_factory(None, config)
    cacher.purge(purges)
dataset/ETHPy150Open pypa/warehouse/warehouse/cache/origin/__init__.py/execute_purge