Resonant cavities are one of the basic building blocks in various disciplines of science and technology, with numerous applications ranging from abstract theoretical modelling to everyday life devices. The eigenfrequencies of conventional cavities are a function of their geometry, and, thus, the size and shape of a resonant cavity is selected to operate at a specific frequency. Here we demonstrate theoretically the existence of geometry-invariant resonant cavities, that is, resonators whose eigenfrequencies are invariant with respect to geometrical deformations of their external boundaries. This effect is obtained by exploiting the unusual properties of zero-index metamaterials, such as epsilon-near-zero media, which enable decoupling of the temporal and spatial field variations in the lossless limit. This new class of resonators may inspire alternative design concepts, and it might lead to the first generation of deformable resonant devices.