Skip to content

zhang740/any-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnyCache

CI Coverage Version License

Function level cache library.

Install

npm i any-cache --save

Example

a simple example

  class TestCls {
    @helper.cache('text')
    async text(t: string) { return t; }

    @helper.cacheEvict('text')
    async evictText(t: string) { return t; }

    @helper.cache((desc: string) => `desc_${desc}`)
    async desc(desc: string, sub: string = '') { return desc + sub; }

    @helper.cacheEvict((desc: string) => `desc_${desc}`)
    async evictDesc(desc: string) { }
  }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published