Moped::SessionStore

Moped::SessionStore is a highly performant MongoDB ActiveSupport Session Store implementation using the excellent new Moped driver from Mongoid 3.

Installation

Add this line to your application's Gemfile:

gem 'moped-session_store'

And then execute:

$ bundle

Or install it yourself as:

$ gem install moped-session_store

Usage

In config/initializers/session_store.rb set the session store as follows:

YourApp::Application.config.session_store :moped_store, :key => "_session_id", :collection => $a_moped_collection_object

The collection key is required, and currently it is required to be an existing Moped collection object, to avoid adding unneccessary additional connections to your MongoDB instance.

MORE TO FOLLOW

Contributing

This is in development at the moment, and there are some cool improvements to come regarding optimising the way that ActiveSupport deals with sessions. I'm always happy to accept contributions, and any new authors will be acknowledged fully for their contributions.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request