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,
SAFE. 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.
Questions, comments, forks, and bugfixes are welcome.