A path integral formulation is developed for the dynamic Casimir effec
t. It allows us to study arbitrary deformations in space and time of t
he perfectly reflecting (conducting) boundaries of a cavity. The mecha
nical response of the intervening vacuum is calculated to linear order
in the frequency-wave-vector plane. For a single corrugated plate we
find a correction to mass at low frequencies, and an effective shear v
iscosity at high frequencies, both anisotropic. For two plates there i
s resonant dissipation for all frequencies greater than the lowest opt
ical mode of the cavity.