Histories of climate change encapsulated in a cave