Skip to content

fix(cache2k): create unbounded cache if maxSize is not specified#184

Merged
iProdigy merged 1 commit into
mainfrom
fix/cache2k-unbounded
Oct 8, 2023
Merged

fix(cache2k): create unbounded cache if maxSize is not specified#184
iProdigy merged 1 commit into
mainfrom
fix/cache2k-unbounded

Conversation

@iProdigy

@iProdigy iProdigy commented Oct 8, 2023

Copy link
Copy Markdown
Member

When ICacheSpec#maxSize yields null, an unbounded cache should be created. By default, cache2k imposes an entryCapacity of 1802 (rather than creating an unbounded cache). As a result, we specify Long.MAX_VALUE to create an unbounded cache when maxSize is null, in accordance to the Xanthic spec.

https://cache2k.org/docs/latest/apidocs/cache2k-api/org/cache2k/Cache2kBuilder.html#entryCapacity(long)

@iProdigy iProdigy added the bug Something isn't working label Oct 8, 2023
@iProdigy iProdigy requested a review from PhilippHeuer October 8, 2023 02:24
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@iProdigy iProdigy enabled auto-merge (squash) October 8, 2023 02:35
@iProdigy iProdigy merged commit bee091e into main Oct 8, 2023
@PhilippHeuer PhilippHeuer deleted the fix/cache2k-unbounded branch October 8, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants