Enhancement and inhibition of second-harmonic generation and absorption in a negative index cavity