'why spring redis session 'touch' method called in 'cleanExpiredSessions' method can clean expired session

i am chinese,My English is so poor,I try my best to describe my problem clearly I recently learned about the spring redis session cleaning mechanism,the clean method is 'cleanExpiredSessions' in RedisSessionExpirationPolicy class,What makes me wonder is the 'touch(String key)' method can clean expire session,why? i think 'spring:session:sessions:d5e0f376-69d1-4fd4-9802-78eb5a3db144' expire time is fiveMinutesAfterExpires,when spring cleanup task runing,the key does not expired,so 'touch(String key)' method can not clean the key

Please explain to me thank you very much



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source