Gravitational effects on a rigid Casimir cavity