Vacuum-induced suppression and enhancement of four-wave mixing in an optical cavity