meteor-user-session icon indicating copy to clipboard operation
meteor-user-session copied to clipboard

Clean up old sessions?

Open christianrank opened this issue 10 years ago • 2 comments

Together with accounts-guest, there are many unused sessions after some time.

I think we need a mechanism to delete all session values of sessions that are not used for a certain time (like accounts-guest cleans up old users), or delete them if the User doesn't exist anymore.

christianrank avatar May 31 '14 02:05 christianrank

+1

I think this should be solved with mongo's TTL feature. http://docs.mongodb.org/manual/tutorial/expire-data/

This stackoverflow question suggests it might work in Meteor: http://stackoverflow.com/questions/18290196/time-to-live-with-meteor-collection

udondan avatar Jun 02 '14 11:06 udondan

For testing and debugging purposes it might be handy to have a 'deleteAll' method to clean out all current UserSessions.

pwujek avatar Jul 27 '14 16:07 pwujek