Limit the number of times flush will be called in total.