Nominating Presidential Muppets

npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

sequelize-transparent-cache-memcached

2.0.2 • Public • Published

sequelize-transparent-cache-memcached

memcached adaptor for sequelize-transparent-cache.

Stores sequelize objects in memcached.

Example usage

const Memcached = require('memcached')
const memcached = new Memcached('localhost:11211')
 
const MemcachedAdaptor = require('sequelize-transparent-cache-memcached')
const memcachedAdaptor = new MemcachedAdaptor({
  client: memcached,
  namespace: 'model', // optional
  lifetime: 60 * 60
})

Constructor arguments

Param Type Required Description
client memcached instance yes Configured memcached instance
namespace string no Prefix for all keys
lifetime integer yes 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-memcached

Downloadsweekly downloads

497

version

2.0.2

license

CC-BY-4.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability