The present invention relates to a method for producing baked goods having a long shelf life, in particular in a closed baking mould, comprising the steps a) producing a baking mix, in particular cake mix, and exposing the baking mix to at least one inert gas and/or air, b) charging the baking mix into at least one baking mould and closing the at least one baking mould, c) baking the baking mix in the at least one closed baking mould in at least one reactor, wherein, in a first phase (phase 1), a reactor pressure and a reactor temperature build up, wherein the reactor pressure at any time point corresponds to an internal pressure in the closed baking mould, in a second phase (phase 2), the reactor pressure and reactor temperature set in the first phase (phase 1) are maintained over a period in which the baking mass is baked, and in a third phase (phase 3), the reactor pressure and the reactor temperature are lowered stepwise, wherein the reactor pressure at any time point corresponds to the internal pressure