
MojoX::Session::Store::MongoDB - MongoDB Store for MojoX::Session

my $session = MojoX::Session->new(
tx => $tx,
store => MojoX::Session::Store::MongoDB->new({
host => '127.0.0.1',
port => 27017,
database => 'some_app',
collection => 'sessions',
}),
transport => MojoX::Session::Transport::Cookie->new,
);
# see doc for MojoX::Session

MojoX::Session::Store::MongoDB is a store for MojoX::Session that stores a session in a MongoDB database.

MojoX::Session::Store::MongoDB implements the following attributes.
mongodbmy $db = $store->mongodb;
Get and set MongoDB::Database object.
mongodb_collmy $collection = $store->mongodb_coll;
Get and set MongoDB::Collection object.

MojoX::Session::Store::MongoDB inherits all methods from MojoX::Session::Store.
newnew uses the database and collection parameters for the database name and the collection name respectively. All other parameters are passed to MongoDB::Connection-new()>.
Instead of the database name you can also pass in a mongodb parameter with a MongoDB::Database object.
createInsert session to MongoDB.
updateUpdate session in MongoDB.
loadLoad session from MongoDB.
deleteDelete session from MongoDB.

git repository etc at http://github.com/abh/MojoX-Session-Store-MongoDB.

Ask Bjørn Hansen <ask@develooper.com>

Copyright (C) 2009 Ask Bjørn Hansen and Develooper LLC.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.