It has nothing to do with cake!
It actually refers to the feeling of nostalgia evoked when an object or event brings a distant memory back into the conscious mind.
The expression is taken from the novel “Swann’s Way”. At one point, the author realizes that eating a “madeleine” brings back memories of his childhood when his aunt fed the small cakes to him dipped in tea.
Proust shows that we accumulate memories unknowingly, and that our emotional memory unintentionally triggers mental memories. They are often built around smells and tastes.
What about you? What smells remind you of your childhood?