donpark/session-mongoose — pull request #16 by dambalah (2013-06-03 18:15:56+00:00)
Title: Ability to turn off the sweeper

I've found that the sweeper was misbehaving and making a lot of mongodb requests. It looks like it was stuck in an infinite loop.

I also realized that some people might not want to have the sweeper running (in my case for example).

So I've added a way to turn off the sweeper by passing a sweeper: false option. The sweeper bug is not fixed by this pull request. The option to bypass it is all i need because I want to expire my sessions separately.

The following graph shows the drop in mongodb requests in a sample application after turning off the sweeper.

![screen shot 2013-06-03 at 2 13 18 pm](https://f.cloud.github.com/assets/8567/601157/78ad30b6-cc79-11e2-97ed-ef41ace92a18.png)