Once they are made active, B cells and T cells produce "memory cells". Throughout the lifetime of an animal, these cells will 'remember' each specific pathogen encountered, and are able to make a strong response if the pathogen is detected again. Memory cells live a long time in the body, and are how vaccinations work.