Override RedisSessionExpirationPolicy#onExpirationUpdated() method to set absolute expires for the springs session in Redis

点点圈 提交于 2021-01-29 17:27:18

问题


I would want to set an absolute time out for the expiration for my sessions and not need it to be calculated based on lastAccessedTime. I have seen the issue https://github.com/spring-projects/spring-session/issues/922 . But my case is different from this case. With setting the expires time as absolute time in redis I can make sure the session does not cling for longer than I want in redis but also ensure session exists in the redis for the amount of time I require it to stay there even if there are no interactions with this session (basically don't want my session to end if there is a small inactivity period)

来源:https://stackoverflow.com/questions/63830026/override-redissessionexpirationpolicyonexpirationupdated-method-to-set-absolu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!