meteor-user-session
meteor-user-session copied to clipboard
Clean up old sessions?
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.
+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
For testing and debugging purposes it might be handy to have a 'deleteAll' method to clean out all current UserSessions.