The generation and maintenance of memory T and B cells.