Cook the spaghetti in plenty of salted water according to the instructions on the packet.
Meanwhile, crush the walnuts or puree them with the mixer. Add butter, parmesan and egg yolks and mix together. Finally add the cream and season with the spices.
Then pour the mixture over the cooked spaghetti and mix well.