Cacheable - Keyv-आधारित Node.js के लिए कैशिंग पैकेज
(github.com/jaredwray)विभिन्न प्रोजेक्ट्स में उपयोग किया जा सकने वाला कैशिंग सॉल्यूशन पैकेज
- cacheable : अगली पीढ़ी का कैशिंग फ्रेमवर्क। Layer 1 / Layer 2 caching को शुरू से डिज़ाइन करके बनाया गया है। distributed caching और scalability में मजबूत
- cache-manager : NestJS जैसी सेवाओं में उपयोग होता है, और wrap जैसी शक्तिशाली सुविधाएँ देता है। विभिन्न एप्लिकेशन्स में व्यापक रूप से उपयोग किया जाता है
- cacheable-request : native HTTP requests में cache functionality जोड़ता है। RFC-compliant cache का समर्थन। network requests पर cache आसानी से लागू किया जा सकता है
- flat-cache : file storage persistence के साथ तेज़ in-memory caching। memory तक तेज़ access के साथ-साथ cache data को file में भी सहेजा जा सकता है
- file-entry-cache : file metadata के लिए lightweight cache। किसी विशेष file set को process करने वाली प्रक्रियाओं के लिए उपयुक्त, पिछली run के बाद बदली हुई files को ही फिर से process करता है
- @cacheable/node-cache : node-cache का replacement package
Cacheable
- distributed caching पर केंद्रित high-performance Layer 1 / Layer 2 caching engine
- CacheSync जैसी enterprise features के लिए समर्थन नियोजित
- Keyv storage engine पर आधारित, जो मज़बूत performance प्रदान करता है
- simple API के साथ data को cache और retrieve करने की सुविधा
- मुख्य विशेषताएँ
- सरल और सहज API
- अनावश्यक modules के बिना हल्का ढांचा
- Keyv के साथ भरोसेमंद और scalable storage engine
- LRU(Least Recently Used) और expiring cache को support करने वाला memory caching
- error recovery और offline support के साथ fault-tolerant architecture
- synchronous और asynchronous functions के लिए Wrap / Memoization support
- functionality को extend करने के लिए Hooks और event handling support
- TTL(समय सीमा) सेटिंग को milliseconds में आसानी से लागू करें (1 मिनट = 60000ms, 1 घंटा = 3600000ms, 1 दिन = 86400000ms)
- non-blocking Layer 2 caching operations का समर्थन
- Pub/Sub-आधारित distributed caching synchronization (जल्द आ रहा है)
- व्यापक testing और code coverage
- ESM और CommonJS समर्थन, Typescript के साथ compatible
1 टिप्पणियां
असल में यह पैकेज के अंदर primary और secondary लेयर बाँटकर
keyvमें स्टोर करने वाला तरीका है।अगर आप पारंपरिक अर्थ में layer 1 / layer 2 caching की उम्मीद कर रहे थे, तो back बटन दबा सकते हैं.