0.0.8 • Published 9 years ago

mondis v0.0.8

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

mondis


WHAT

  • We just make redis-mongoose more simple.

WHY

  • Why this name?

    mondis == mon(goose)(re)dis

  • Why need it?

  1. We need read from redis first and write to redis last when you are using mongo and redis. Another words, we wrap DB with cache.
  2. We don't want to change exist caller and callee for DB, intrusive mood is confused and coupled.
  3. So, we use hooker to decouple it and provide some structs for you.

HOW

  • hash
//just one line, you don't need to change you original code.
/*
 * @Model mongoose model
 * @redis the instance of redis client
 * @prefix for key to redis
 * @ttl time to live for redis
 * @methods ['create', 'remove', 'update', 'findById'] support for Model
 */
mondis.hash(Model, redis, prefix, ttl, methods);
0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago