Track when users/things were last seen using redis.
This library is pretty experimental right now but does actually work, I'm just not sure how much of a good idea it is
Unlike some other "who is online" libraries which you might come across, this library does not expire keys (it can't because of Redis' current design) and is therefore unbounded in terms of memory consumption. If you keep on tracking new ids you will eventually run out of RAM.
This is completely by design, it's meant to track things for very long periods of time.
$ npm install online
var Lastseen = ;var redis = ;var client = redisvar opts =redisKey: 'online' //name for redis key for setvar lastseen = ;lastseen//Check if a user is known aboutlastseen
For now read the docblocks in
PRs, issues bugs, comments and general derision are welcome