I adored Twinkies as a kid, vastly preferring them to Ding-Dongs or SnowBalls, and my folks used to give me a box every Christmas. Jokes about eternal shelf life notwithstanding, I gobbled the spongy crème-filled cakes down greedily, naively confident that Twinkies would always be in stock for next Christmas.

So even though I no longer gorge myself on Twinkies, I totally understood when the announcement late last year that Hostess was filing for bankruptcy gave rise to howls of anguish around the Internet over the prospect that many of the company’s tasty snacky-cakes would no longer be available to consumers – including Twinkies. Many people responded much like Tallahassee in Zombieland, who made it his personal quest to track down the last box of Twinkies in the midst of a zombie apocalypse:

The good news for Twinkie fans is those last few boxes will likely last awhile before the tasty sponge cakes get stale -- i.e., the cake loses moisture and hardens as it dries out, until it's really only good for use as, say, projectile weapons should a zombie or a Twinkie-craving burglar break into your kitchen one night.

You can’t say the same for fresh-baked cakes, most of which have a shelf life ranging from one week to four weeks, depending on factors like temperature and relative humidity of the storage area. And that's an optimistic assessment: for sponge cake, with its lighter texture, shelf life is closer to three to five days. (Refrigeration won't help; it'll just make the cake dry out faster. Try freezing sponge cake instead, if you can't nom it all up immediately.)

It’s a simple enough task to test for freshness in the comfort of one’s own kitchen, but on a larger scale – especially on the scale of a Hostess manufacturing facility – it might be handy to have a non-invasive high-tech way to measure freshness. And that’s where science can help, according to a new paper by French scientists in the Journal of Agricultural and Food Chemistry. They used various techniques to analyze lab-baked sponge cakes from Day One, when they were fresh, and monitored how their properties changed as they grew stale over 20 days.

Believe it or not, this sort of thing has been a subject of scientific study for over 100 years, although, the authors write, "From a molecular point of view, the mechanism of cake staling is not clear yet."

First, let's define our terms. What are the essential properties of "freshness"? To a physicist a sponge cake is more than a tasty treat: it's a material, technically a kind of foam, which falls under the rubric of soft condensed matter. And like any material it has properties. The ones of most interest to food scientists when determining freshness are moistness and texture.

You can determine the moisture content by weighing sponge cake slices before and after becoming completely dried out after spending a couple of hours in a hot oven (130 degrees Celsius). For texture, you want to look at hardness -- how much force it takes to "deform" the spongy mesh of the cake -- and elasticity, which is how fast the sponge bounces back to its original shape after the deforming force is no longer being applied.

There are many tools for monitoring cake texture -- baker compressimeters, texturometers, friabilimiters, penetratometers, and rheometers, to name a few -- but they're time-consuming (requiring a certain degree of skill to operate the equipment) and destructive, so food scientists would love non-invasive methods for assessing the quality of cake. Wouldn't it be great if you could just shine some light on a cake sample and figure out if it was stale or not? So the French researchers' thoughts naturally turned to fluorescence spectroscopy.

Spectroscopy techniques shoot light at a sample, and analyze the resulting scatter looking for unique spectra. Those spectra can tell scientists what chemicals are present, for example -- it's like an electromagnetic fingerprint. Fluorescence spectroscopy uses UV light, and when it hits certain compounds, they fluoresce, usually in the visible regime, although not always.

But could you really use this technique to analyze sponge cake? You betcha! The amino acid tryptophan -- found in many foods, including red meat, cottage cheese, eggs, poultry, pumpkin and sunflower seeds, bananas and peanuts, chocolate, oats, milk and yogurt, to name a few -- is one of those compounds. Proteins are also vital components in sponge cake; many of those big protein molecules are fluorescent, especially those that contain residues of tryptophan. That means it's feasible to use the shape of the tryptophan fluorescence spectra as a kind of "fingerprint" to determine whether a sponge cake is fresh, still edible, or, um, past its prime.

The French researchers set out to test this hypothesis. Any savvy science writer will tell you that the methods section of a paper can be hugely entertaining. I personally love any paper with listed materials like wheat flour, crystal sugar, glucose syrup, liquid whole egg, powdered milk, and a dash of baking powder. The French scientists followed the standard sponge cake recipe, even noting the speed of the mixer (set at 60 rpm for two minutes) for posterity. This is an important part of the sponge cake baking process, since that moist, light texture is due to the air bubbles that get mixed into the fat and sugar during the initial "creaming stage" -- so very important when it comes to beating in those critical air bubbles.

Per Guardian food blogger Andy Connelly, an American author of popular cookbooks named Miss Leslie observed in 1857 that creaming the butter and sugar was the most difficult part of the cake making process and advised, "Have this done by a manservant." Or, you know, a lab assistant. Armed with an industrial mixer. (Connelly also points out that the fats coat the air bubbles, thereby reducing the formation of gluten. You want some gluten forming, you just don't want too much of it!)

Then they added the egg, which contains proteins that help keep the fat-coated air bubbles from collapsing when baking in the oven; the expansion of the trapped air inside the bubbles is what makes the cake rise, along with a dash of baking powder.

Next they folded in the sifted powdered ingredients, mixing the batter at a lower speed of 20 rpm for one minute to avoid bursting all the air bubbles so painstakingly added during the prior step. And so forth.

Once the batter was ready, it was immediately folded into uniformly sized cake pans and baked in a pre-heated oven at 160 degrees Celsius for 37 minutes. The authors of the study took great care to keep the temperature uniform and the oven well-ventilated, because sponge cake is particularly sensitive to these kinds of variations. As Connelly notes, "If the oven temperature was too low, then the batter will have set too slowly, and expanding gas cells will have coagulated to produce a coarse, heavy texture, making the upper surface sink. If the oven was too hot then the outer portions of the batter will have set before the inside has finished expanding, which produces a peaked, volcano-like surface with excessive browning."

Then the 28 sponge cakes were cooled for 40 minutes and vacuum sealed into individual plastic bags. The samples were stored at 20 degrees Celsius and 65% humidity, and various cakes were analyzed after sitting for one, three, six, nine, sixteen, and twenty days of storage.

Now the real work began. First they prepared the samples, which entailed taking thin slices from the sample cake -- not the ends, nobody likes those, but taken from about 2 cm in from either end. Then a circular "core sample" was taken from the center of each slice. The samples were mounted between two quartz slides, and zapped with light from the spectrometer. The resulting spectra was recorded and analyzed.

So what did they find? There was not much difference in terms of color among the samples. As for texture, there was an inversely proportional relationship between increases in hardness and decreases in elasticity -- that is, the dryer and harder the sponge became, the less elastic it was; it just didn't spring back with the same mouth-watering sponginess after being poked. Less moisture means more cross-linking between the starches and proteins in the cake, making it harder and less elastic.

The most significant changes in texture occurred in the first nine days; after that, the additional increases and decreases in hardness and elasticity were minimal.

As for the fluorescent tryptophan, there was a distinct red shift in the spectra as the cakes aged. Not only that, but the researchers used a multivariate statistical technique to show there was a clear distinction in the spectra of cakes aged at various times, and those differences correlated nicely to the tryptophan fluorescence spectra. So they could distinguish between the sponge cakes aged one, three and six days from those aged for nine, sixteen and twenty days. That correlation is key: the texture analyzer revealed the macroscopic properties, and these correlated to the molecular-scale structure revealed by the spectra analysis.

And there you have it: experimental proof of principle that this is a winning combination of tools for telling us something useful about the freshness of a piece of sponge cake -- although I doubt we’ll all be installing bulky fluorescence spectrometers in our kitchens any time soon. Combine it with a texture analyzer in a miniaturized handheld device, however, and some savvy inventor could make a tidy fortune.


Botosoa, Eliot; Chene, Christine; Karoui, Romdhane. (2013) “Monitoring Changes in Sponge Cakes During Aging by Front Face Fluorescence Spectroscopy and Instrumental Techniques,” Journal of Agricultural and Food Chemistry 61: 2687-2695.

Erlander, S.R. and Erlander, L.G. (1969) “Explanation of Ionic Sequences in Various Phenomena X. Protein-Carbohydrate Interactions and the Mechanism for the Staling of Bread,” Starch 21: 305-315.

Gomez, M. et al. (2010) “Modeling of Texture Evolution of Cakes During Storage,” Journal of Texture Studies 41: 17-33.

Gray, J.A. and Bemiller, J.N. (2003) “Bread Staling: Molecular Basis and Control,” Compr. Rev. Food Sci. Food Saf. 2:1-21.

Karoui, R.; Downey, G.; and Blecker C. (2010) “Mid-Infrared Spectroscopy Coupled with Chemometrics: A Tool for the Analysis of Intact Food Systems and the Exploration of Their Molecular Structure-Quality Relationships – A Review,” Chemical Review 110: 6144-6168.