advanced-cache-js
v1.0.0
Published
A high-performance caching solution with multi-layer caching, cache invalidation strategies, and advanced features.
Downloads
5
Maintainers
Readme
advanced-cache-js
A high-performance caching solution with advanced features.
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
Installation
npm install advanced-cache
Configuration
Create a config.js
file in the src
directory to manage the settings.
Usage
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);
})();
Testing
Run tests with Mocha and Chai:
npm test
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License.