The design of vaccines that protect against intracellular infections or cancer remains a challenge. In many cases, immunity depends on the development of antigen-specific memory CD8+ T-cells that can express cytokines and kill antigen-bearing cells when they encounter the pathogen or tumor. Here, the authors review current understanding of the signals and cells that lead to memory CD8+ T-cell differentiation, the relationship between the primary CD8+ T-cell response and the memory response and the regulation of memory CD8+ T-cell survival and function. The implications of this new knowledge for vaccine design are discussed, and recent progress in the development of lipidated peptide vaccines as a promising approach for vaccination against intracellular infections and cancer is reviewed.