"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > ENCACHE

ENCACHE

Published on 2024-07-31
Browse:845

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

Release Statement This article is reproduced at: https://dev.to/ryuxxsmx/encache-1cl9?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3