cache2k version 0.28-BETA “Bahia de Santa Cruz”
New and Noteworthy
- SLF4J support added
Bug fixes
If something is listed here it might affect an existing application and updating is recommended.
- OSGi: Add missing export of package
org.cache2k.configuration - Fix size methods (was stack overflow):
Cache.asMap().values().size(),Cache.asMap().entrySet().size(),Cache.asMap().keySet().size(), closes: https://github.com/cache2k/cache2k/issues/51 Cache.asMap(): Fixequals()implementation, correct optionalnullsupport-
Simplified metric gathering, removed superfluous internal counters
- Fix unnecessary hash table growth when concurrent inserts in different segments each trigger an expand
Fixes and Improvements
- improve robustness for
close()/ improve consistent behavior and avoid misleading exceptions when a closing/close cache is accessed Cache2kBuilder.entryCapacity(Long.MAX_VALUE)means capacity is unlimited. Fixed internal integer overflows when this is used.- improve entry iterator: Immediately throws a
CacheClosedExceptionwhen the cache gets closed during an iteration. internal references of the iterator at the end of iteration to prevent memory leaks. - Rename JMX property:
getRefreshHitCnt->getRefreshedHitCnt - Rename JMX property:
getRefreshSubmitFailedCnt->getRefreshFailedCnt - Limit loader latency value to three fractions in toString() result, thus avoid: msecs/load=833.2831546786805
- Dropped separate usage counter. Use read usage (get) or write usage (put) counters.
- strip some internal info from the
toString()output toString(): Fix output of used cache implementation and added eviction implementation- JMX: strip some JMX properties
- Simplify
hashQualitymetric
API Changes and new methods
- Make eternal (no expiry) the default behavior, there is no need to specify either
eternalorexpiryAfterWriteany more explicitly, closes: https://github.com/cache2k/cache2k/issues/21
Using this cache2k version
For Java SE/EE environments
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-api</artifactId>
<version>0.28-BETA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-all</artifactId>
<version>0.28-BETA</version>
<scope>runtime</scope>
</dependency>
For Android
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-api</artifactId>
<version>0.28-BETA</version>
</dependency>
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-core</artifactId>
<version>0.28-BETA</version>
<scope>runtime</scope>
</dependency>
Using the JCache / JSR107 provider
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-jcache</artifactId>
<version>0.28-BETA</version>
</dependency>
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.0.0</version>
</dependency>