A high-performance caching solution with advanced features.
- Multi-layer caching (in-memory, distributed cache, persistent storage)
- Cache invalidation strategies (time-based, event-based, manual)
- Integration with various cache stores (Redis, Memcached)
- Cache warm-up and prefetching capabilities
- Detailed cache hit/miss statistics and monitoring
npm install advanced-cache
Create a config.js
file in the src
directory to manage the settings.
const CacheManager = require('advanced-cache-js');
(async () => {
const cacheManager = new CacheManager();
await cacheManager.set('key1', 'value1');
const value = await cacheManager.get('key1');
console.log(value); // Output: value1
const stats = await cacheManager.stats();
console.log(stats);
})();
Run tests with Mocha and Chai:
npm test
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.