Could be some of the cream in it has gone sour; it might contain an ingredient you’re allergic to; or (and here’s the annoying one) it could be that something else entirely made you sick shortly after eating cake. But, from then on, your brain has made the connection and considers cake out of bounds; if you even look at it again it can trigger the nausea response.
Like the sushi and kimchi and zucchini I once had. But the effect seems to lessen over time in my experience.

