  A path integral formulation is developed for the dynamic Casimir effect. It
allows us to study arbitrary deformations in space and time of the perfectly
reflecting (conducting) boundaries of a cavity. The mechanical response of the
intervening vacuum is calculated to linear order in the frequency-wavevector
plane, using which a plethora of interesting phenomena can be studied. For a
single corrugated plate we find a correction to mass at low frequencies, and an
effective shear viscosity at high frequencies that are both anisotropic. The
anisotropy is set by the wavevector of the corrugation. For two plates, the
mass renormalization is modified by a function of the ratio between the
separation of the plates and the wave-length of corrugations. The dissipation
rate is not modified for frequencies below the lowest optical mode of the
cavity, and there is a resonant dissipation for all frequencies greater than
that. In this regime, a divergence in the response function implies that such
high frequency deformation modes of the cavity can not be excited by any
macroscopic external forces. This phenomenon is intimately related to resonant
particle creation. For particular examples of two corrugated plates that are
stationary, or moving uniformly in the lateral directions, Josephson-like
effects are observed. For capillary waves on the surface of mercury a
renormalization to surface tension, and sound velocity is obtained.
