You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Kiko Beats 8ff8aa8650
docs: fix namespace
3 years ago
..
src fix: removed tls 3 years ago
test fix: removed tls 3 years ago
CHANGELOG.md chore(release): v1.1.1 3 years ago
README.md docs: fix namespace 3 years ago
package.json chore(release): v1.1.1 3 years ago

README.md

@keyvhq/mongo keyv

MongoDB storage adapter for Keyv.

Uses TTL indexes to automatically remove expired documents. However MongoDB doesn't guarantee data will be deleted immediately upon expiration, so expiry dates are revalidated in Keyv.

Install

npm install --save keyv @keyvhq/mongo

Usage

const Keyv = require('keyv')

const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname')
keyv.on('error', handleConnectionError)

You can specify the collection name, by default 'keyv' is used.

e.g:

const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname', { collection: 'cache' })

License

@keyvhq/mongo © Microlink, Released under the MIT License.
Authored and maintained by Microlink with help from contributors.

microlink.io · GitHub @MicrolinkHQ · Twitter @microlinkhq