DEV Community

Cover image for ENCACHE
Harsh S
Harsh S

Posted on

ENCACHE

Presenting you Encache !! a lightweight, easy to use Async caching library for your Nodejs server. Encache was developed as a next iteration to all the existing in-memory, volatile caching libraries available on NPM, taking it a whole new level, while maintaining the simplicity as the entire cache can be setup in just 4 lines of code.

Salient Features

  • Currently Encache supports multiple eviction policies. These policies can be dynamically changed throughout the cache's life . They are
  1. FIFO
  2. LRU
  3. LFU
  4. Lazy- TTL
  5. Random
  6. No-Eviction
  • Encache provides optional data compression to your cache to improve the memory utilization and efficiency. Currently it provides LZ4, which on an average can improve the efficiency on non-random, partially random and pseudo random texts by 50% !. This enables Encache to be a large data store while providing the simplicity of the cache.

  • Encache currently provides insightful user-centric metrics like hitRatio ,missRatio, memoryConsumption , fillRate and evictionRate .

  • These benchmark numbers would also be directly available with a logging service , which is under development.

Conclusion

I'm not saying that this library is any quicker or more complete than other products out there, like Redis. But I'm sure it offers a lot of useful features for projects that don't utilize cache much or for people who just want to quickly and simply set up a cache without having to deal with the hassle of setting up and maintaining third-party cache services.

I acknowledge that the library will have its fair share of bugs, imperfections, and problems (I'm a newbie), but I'd like to work with you guys to improve it and make it more user-friendly. Please feel free to suggest and request features. Please DM me at any time!

Try out this package
$ npm install encache

check out the github repository for code and documentation
https://github.com/ryuusama09

Top comments (0)