loopback-rediscache-models

2.4.1 • Public • Published

loopback-rediscache-models

Caching system for Loopback through redis - maintains data in redis for all data of specified models

Usage client side

In a boot script

var cache = require('loopback-rediscache-models')(
{
    app: app,
    models: ['Customer']
});

Then in the models you want to use cache

var cache = require('loopback-rediscache-models')();
cache.findObj('Customer', 'id', 1).then(function (customer)
{
    console.log(customer);
});

Readme

Keywords

Package Sidebar

Install

npm i loopback-rediscache-models

Weekly Downloads

2

Version

2.4.1

License

none

Unpacked Size

35.3 kB

Total Files

20

Last publish

Collaborators

  • glesage
  • nickchapleau