Skip to content

Knowre-Dev/swint-redis-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swint-redis-cache

Greenkeeper badge Redis cache for Swint

Warning: This is not the final draft yet, so do not use this until its official version is launched

Installation

$ npm install --save swint-redis-cache

Options

  • host : String, default: 'localhost'
  • pass : String, default: ''
  • port : Number, default: 6379
  • db : Number, default: 0
  • Methods
    • .set(key, data, ttl, callback)
      • key : String
      • data : Object
      • ttl : Number
      • callback: Function
    • .get(key, callback)
      • key : String
      • callback: Function

Usage

var cacheInst;

new RedisCache(cred, function(err, redisCache) {
	cacheInst = redisCache;
	// ...
});

// ...

cacheInst.set('foo', data, 30, function(err, reply) {
	// ...
});

cacheInst.get('foo', function(err, reply) {
	// ...
});

About

Redis cache for Swint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •