Home  >  Q&A  >  body text

java - 用Redis实现分布式Session失效时间问题

高洛峰高洛峰2711 days ago660

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-18 10:47:56

    That’s true: “Every request will refresh the Session, making the Session’s destruction time the user’s last operation + 10 minutes”

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:47:56

    You can set the expiration time when setting the key in redis.
    You just need to set the expiration time after 10 minutes every time you update the session.
    The session will expire when the user accesses it ten minutes later, and the session will naturally become invalid.

    reply
    0
  • Cancelreply