Browse Source

updating docs for custom stores

hotfix/0.7.1
Bryan Donovan 12 years ago
parent
commit
60c06028d0
  1. 16
      README.md

16
README.md

@ -89,6 +89,22 @@ node-cache-manager handles easily and transparently.
// Returning user from slow database.
// { id: 123, name: 'Bob' }
// { id: 123, name: 'Bob' }
```
#### Custom Stores
You can use your own custom store by creating one with the same API as the
build-in redis and memory stores. To use your own store, you can either pass
in an instance of it, or pass in the path to the module.
E.g.,
```javascript
var my_store = require('your-homeade-store');
var cache = cache_manager.caching({store: my_store});
// or
var cache = cache_manager.caching({store: '/path/to/your/store'});
```
### Multi-Store

Loading…
Cancel
Save