# beaker-mongodb

MongoDB backend for Beaker's caching / session system.

## Configuration

To set this up in your own project so that beaker can find it, it must define a setuptools entry point in your setup.py file. If you install from the egg distribution, beaker-mongodb setup.py SHOULD create a beaker.backend entry point. If you need to tweak it/see how it's done or it just doesn't work and you need to define your own, mine looks like this:

>>> entry_points="""
... [beaker.backends]
... mongodb = beaker.ext.mongodb:MongoDBNamespaceManager
... """,


With this defined, beaker should automatically find the entry point at startup (Beaker 1.4 and higher support custom entry points) and load it as an optional backend called 'mongodb'.

There are more configuration options and details in the Beaker configuration docs [1].

 [1] Beaker's configuration documentation - http://beaker.groovie.org/configuration.htm

I have a few cache regions in one of my applications, some of which are memcache and some are on mongodb. The region config looks like this:

>>> # new style cache settings
... beaker.cache.comic_archives.type = libmemcached
... beaker.cache.comic_archives.url = 127.0.0.1:11211
... beaker.cache.comic_archives.expire = 604800

>>> beaker.cache.navigation.url = mongodb://user@password@localhost:27017/beaker.navigation