From 60c06028d08ffe97ea380da0e05e20acf2662865 Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Sun, 7 Apr 2013 13:17:41 -0700 Subject: [PATCH] updating docs for custom stores --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index d4e601a..c3cf71c 100644 --- a/README.md +++ b/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