A new implementation of an all-optical associative memory is presented. It is realized in a nonresonant cavity containing a photorefractive and a nematic liquid crystal. The images, which are stored on slides, modulate the intensities of the signal beams circulating in the cavity. In a photorefractive KNbO3 crystal the signal images are compared with an arbitrary input image on the pump beam by multiple two-beam coupling. In the nematic liquid-crystal cell the signal images are thresholded by a feedback-induced optical bistability. Associative readout, error correction, and image completion are demonstrated for two and three stored black-and-white images. The performance of the new scheme is estimated to be comparable with that of nonlinear holographic associative memories based on thin holograms.