pomelo-sync-redis-plugin

pomelo-sync-redis-plugin ==================

npm install pomelo-sync-redis-plugin
2 downloads in the last week
28 downloads in the last month

pomelo-sync-redis-plugin

sync plugin for pomelo(>=0.6)

pomelo-sync-redis-plugin is modified from pomelo-sync-plugin

Use pomelo-sync-redis to compose this plugin, you can check the detail information in here.

Installation

npm install pomelo-sync-plugin

Usage

var sync = require('pomelo-sync-plugin');

//app.js

app.use(sync, {sync: {
  path: __dirname + '/app/dao/mapping', dbclient: mongoClient,
  port: 6379, //default is 6379
  host: "127.0.0.1" //default is 127.0.0.1,
  interval: 100000,
  isSyncer: true, // default is false
  keys:{
    MERGER_MAP_KEY: "POMELO:SYNC:MERGER:MAP", //key of mergerMap in redis
    USER_SET_KEY: "POMELO:SYNC:%s:SET", //key of user set, it is a key format
    FLUSH_SET_KEY: "POMELO:SYNC:FLUSH:SET" //key of flushQueue in redis
  }
}});
npm loves you