npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

sequelize-transparent-cache-memcache-plus

2.0.2 • Public • Published

sequelize-transparent-cache-memcache-plus

memcache-plus adaptor for sequelize-transparent-cache.

Stores sequelize objects in memcached using memcache-plus client.

Example usage

const MemcachePlus = require('memcache-plus')
const memcachePlus = new MemcachePlus()
 
const MemcachePlusAdaptor = require('sequelize-transparent-cache-memcache-plus')
const memcachePlusAdaptor = new MemcachePlusAdaptor({
  client: memcachePlus,
  namespace: 'model', // optional
  lifetime: 60 * 60   // optional
})
 

Constructor arguments

Param Type Required Description
client memcache-plus instance yes Configured memcache-plus instance
namespace string no Prefix for all keys
lifetime integer no Keys lifetime, seconds

Storing format

Each object stored as single JSON string. Namespace delimeter is ":".

Key Value
<namespace>:<modelName>:<objectId> {JSON string}

For more info see sequelize-transparent-cache

install

npm i sequelize-transparent-cache-memcache-plus

Downloadsweekly downloads

225

version

2.0.2

license

CC-BY-4.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability