def METHOD_NAME(session):
    """
    Called from post-flush hook to bump the latest id stored in redis
    """
    def get_namespace_public_id(namespace_id):
        # the namespace was just used to create the transaction, so it should
        # still be in the session. If not, a sql statement will be emitted.
        namespace = session.query(Namespace).get(namespace_id)
        assert namespace, "namespace for transaction doesn't exist"
        return str(namespace.public_id)
    mappings = {
        get_namespace_public_id(obj.namespace_id): obj.id
        for obj in session
        if (obj in session.new and isinstance(obj, Transaction) and obj.id)
    }
    if mappings:
        redis_txn.zadd(TXN_REDIS_KEY, **mappings)