We extend our previous work on the electromagnetic Casimir-Lifshitz interaction between two bodies when one is contained within the other. We focus on the fluctuation-induced pressure acting on the cavity wall, which is assumed to be spherical. This pressure can be positive or negative depending on the response functions describing the bodies and the medium filling the cavity. However, we find that, under general hypotheses, the sign is independent of the geometry of the configuration. This result is based on the representation of the Casimir-Lifshitz energy in terms of transition operators. In particular, we study the components of these operators related to inside scattering amplitudes, adapting the invariant imbedding procedure to this unfamiliar scattering setup. We find that our main result is in agreement with the Dzyaloshinskii-Lifshitz-Pitaevskii result, which is obtained as a limiting case.