Adding route pattern support to flush()