From Phys.Org:
Before this study, scientists were not sure how cells can remember an infection from up to 30 years earlier. To tease apart this mystery, the research team tracked a specific kind of immune cell through the human body in the weeks, months and years following a vaccination that gives long-term protection. The researchers tracked T cells inside people's bodies after they were given the long-lasting yellow fever virus vaccine, using a technology developed at Berkeley for monitoring the birth and death of cells in humans over long periods of time. The researchers found that CD8+ T cells, responsible for long-term immunity against yellow fever, proliferate rapidly on exposure to the vaccine but then evolve, beginning about four weeks after the vaccination, into a "memory pool" of cells that live more than 10 times longer than the average T cell.
More here.