It is found that a specific subset of PD-1+ tissue resident memory CD8+ T cells plays the predominant role in the response to anti-PD-1 treatment and is significantly reduced in number along with the tumor progression. This evidence concerns the gene CD8A and neoplasm.