MongoDB driver for Stash
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/MongoStash
test
.gitignore
LICENSE
README.md
composer.json

README.md

MongoDB Driver for Stash

This is a MongoDB Driver for Stash, supporting MongoClient and the new-style MongoDB library.

This enables you to use a persistent and distributed store as your cache driver, which can be ideal for homogenic and distributed systems.

Usage

$mongo = new \MongoClient(); // Whatever it is you are doing to create your Mongo client instance

$pool = new \Stash\Pool(new \MongoStash\MongoDB([
    'mongo' => $mongo,
    'database' => 'local',
    'collection' => 'stash.store' // This is optional, stash.store is the default.
]));

And you are ready to go.