A mini-cart is not cleared after an order is placed or a customer is logged out

How to clear the mini-cart on an order placement?