The gland under the sternum referred to is the thymus. (Not to be confused with the thyroid)
The immune system “memory” is stored in lymphocytes. After each exposure to an antigen, not only are there more lymphocytes circulating which produce antibodies specific to that antigen, but the antibodies react more strongly to the antigen (more of the cells make antibodies with higher binding affinities for that particular antigen).
Over time, fewer of the lymphocytes remain in circulation, but re-exposure stimulates the existing cells to multiply.
Lymphocytes hang out in the spleen, the thymus, and the lymph nodes, and circulate in the blood stream as well.