Skip to content

darky/memoize-redis-decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memoize-redis-decorator

Memoize decorator, backed by Redis

Example

import {MemoizeRedis} from 'memoize-redis-decorator'

const memoizeRedis = new MemoizeRedis({
  ttl: 600 // Time to live, default 600 seconds
  redisOptions: {} // Options, which directly passed to ioredis. By default, connected to locahost:6379
})

class MyClass {
  @memoizeRedis.memoize()
  async needCache(args) {
    // Some heavy stuff...
  }
}

About

Memoize decorator, backed by Redis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published