fiskie / mongostash
MongoDB Driver for Stash.
Installs: 64
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/fiskie/mongostash
Requires
- php: ^5.4|^7.0
- tedivm/stash: >=0.13.0
Requires (Dev)
- phpunit/phpunit: 6.2.1
This package is not auto-updated.
Last update: 2025-10-12 00:09:58 UTC
README
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.