andreacfm/Railo-MongoDB-Cache-Extension — pull request #1 by mtbkapp (2012-11-14 17:53:50+00:00)
Title: Changed singleton MongoDB connection to a connection factory.  The new c...

...onnection factory uses the web config id and the cache name as an identifier for unique MongoDB connections and given that identifier will return the same connection. The configuration struct each connection is configured with is also stored in the connection factory so if a connection is requested with the same identifier but different arguments then the old connection can be closed and a new connection can be made. The singleton method previously implemented made it so only a single connection to MongoDB could be made per JVM. Also, removed the clean task in favor of a threshold mechanism. A separate thread can never be stopped because of the way Railo interacts with the cache driver. The threshold mechanism clears the cache of invalid entires after 1000 reads.