The Cabin Crew don't wear their hats in the cabin with the doors closed, so neither should we.
The cap is part of the uniform so it should only be worn when in uniform. With a yellow jacket on, we are NOT in uniform so it should not be worn in this case.
If the management want us to maintain this 'military' look, then we should obey the same rules. No?
GB