I was a pilot for United. Coffee was my life blood. I carried a mug for my coffee and also a carafe that held about 2 mugs of coffee. That gave me three mugs, which lasted me about four or five hours. It was policy not to open the cockpit door, unless one of us needed to use the lavatory or an emergency. Anytime one of us left the cockpit to use the lavatory, a flight attendant had to stand inside the cockpit door or they were allowed to sit in our seat, but very carefully, so as not to touch or bump anything.