Releases: GtechGovind/KCache
Releases · GtechGovind/KCache
Release list
KCache v0.0.2
Changelog for KCache Class
Version 0.0.2
- Improved API and Additional Features
- Asynchronous
withCacheMethod: AddedwithCacheAsyncmethod for asynchronous caching and computation of values when a cache miss occurs. This method supports coroutines and helps offload computation tasks. - Eviction Callback Enhancement: Expanded the eviction callback to include both the key and value being evicted, providing more useful information to developers when items are removed from the cache.
- Auto Cleanup Toggle: Introduced a method to enable or disable the automatic cleanup of expired cache items. This allows for more granular control over when cache cleanup should occur.
- Debug Callback: Added the option to provide a debug callback for logging cache operations such as put, get, and eviction. This helps developers monitor cache behavior more easily.
- Optimized Memory Usage: Improved memory management in the cache to ensure faster access times and reduced memory consumption, especially when handling a large number of keys.
- Performance Improvements: Reduced latency for cache lookups and evictions, improving overall performance in multithreaded environments.
- Additional Cache Configuration Options: Introduced more granular configuration options in
CacheBuilder, including better support for large data sets and tighter memory limits. - API Documentation and Code Comments: Enhanced code documentation and added more detailed comments for each method, making it easier for developers to understand and use the cache library effectively.
- Asynchronous
KCache v0.0.1
Changelog for KCache Class
Version 0.0.1
- Initial Release
- Introduced an in-memory cache with basic functionality.
- Supported time-to-live (TTL) for cache items, where items older than the TTL are considered expired.
- Implemented the Least Recently Used (LRU) eviction policy to manage cache overflow when the maximum size (
maxSize) is exceeded. - Allowed both synchronous and asynchronous access to cache items via
put/getmethods andputAsync/getAsyncmethods. - Enabled automatic periodic cache cleanup with configurable cleanup interval (
cleanupIntervalMillis). - Provided optional logging functionality to track cache operations (e.g., item addition, eviction, removal, and expiration).
- Introduced an eviction callback function to notify when items are evicted from the cache.
- Added
CacheBuilderclass for flexible and fluent configuration of cache settings (TTL, max size, cleanup interval, logging, eviction callback).