Posted on July 19th, 2010 at 07:08 PM by Corey Ballou
I have posted a couple of important updates to MongoSession (a PHP MongoDB Session Handler) that I’d like to share with you.
- I have removed the secondary indexed id field which should speed up operations as well as reduce the storage requirements. This is most beneficial for larger sites supporting a high rate of concurrent users.
- I recently added two boolean constants,
FSYNCandSAFE. These two constants are documented on the MongoCollection::update() page and can be turned on to ensure your session data is actually written to the server. Please note that turning these variables on will cause a performance hit to the overall session handling. - Both the garbage collection and session write methods have been updated to perform atomic operations. This was done as a measure to reduce the risk of race conditions as mentioned on the project page.
- A bug was fixed in the read method where an extra line of code existed for no reason.
- A bug in the garbage collector was fixed. Update previously only updated a single result as opposed to the whole set of matches.
Click here to be taken to the project page.
Questions, comments, forks, and bugfixes are welcome.

Very informative blog. I like your blog because of unique content. thanks for sharing such a useful information.