An electromagnetic cavity is a cavity that acts as a container for electromagnetic fields such as photons, in effect containing their wave function inside. The size of the cavity determines the maximum photon wave length that can be trapped. Additionally, it produces quantized energy levels for trapped charged particles like electrons and protons. The earth's magnetic field in effect places the earth in an electromagnetic cavity.
Read more about Electromagnetic Cavity: Physical Description of Electromagnetic Cavities, Applications of Electromagnetic Cavities