1.0.0 • Published 7 years ago

rduk-cache v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

RDUK - Cache

Build Status Coverage Status

Manage cache in your Node.js app

Installation

# install rduk-cache module
npm install rduk-cache --save --save-exact

# install rduk-cache store (here redis)
npm install rduk-cache-store-redis --save --save-exact

Cache Store implementations

How to use

cache store configuration

  1. Add a config.yml file to your app (more information)
  2. Add a cacheStore section (see below for redis configuration)
---
cacheStore:
    name: redis
    providers:
        -
            name: redis
            type: rduk-cache-store-redis
            url: redis://...
var cache = require('rduk-cache');

Promise set(key, value)

cache.set('key', {
    prop1: 'value 1',
    prop2: 'value 2'
})

Promise get(key)

cache.get('key')
    .then(function(obj) {
        console.log(obj.prop1); // output: 'value 1'
    });
1.0.0

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago