I've found that plain old detergent and warm water applied with a
scrub brush does an adequate job at getting the decayed foam out of
cabinet interiors (or any other place where water won't damage
things).
The worst thing IMOHO, to use is mineral spirits. The result is lots
of sticky black gunk. Really a hideous mess.
After I'm done with the water, if there's any adhesive left on the
surface, I'll then use mineral spirits to remove it.
Cheers,
Chuck