true flush
add getMiddleware static method