We found that triggering the signaling of Dectin-2 during vaccination, augments the expansion, differentiation, and tissue residency of antigen-specific CD4+ and CD8+ T cells in the lung upon fungal and viral challenge and protects mice against experimental infection. Here, CD8A is linked to infection.