Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncCache support (caffeine 2.7) #1254

Closed
ben-manes opened this issue Mar 2, 2019 · 2 comments
Closed

AsyncCache support (caffeine 2.7) #1254

ben-manes opened this issue Mar 2, 2019 · 2 comments
Labels
enhancement A general enhancement release notes Noteworthy change to call out in the release notes

Comments

@ben-manes
Copy link

Micrometer provides convenient bindings for Cache, LoadingCache, and AsyncLoadingCache. AsyncCache was recently split off from AsyncLoadingCache based on integrations where the mapping function isn't provided up front (e.g. Akka's http cache) or for those who need to capture non-key parameters in the given lambda. These behaviors were supported by AsyncLoadingCache but a little clunky.

I believe all that is required is changing CaffeineCacheMetrics from

public static <C extends AsyncLoadingCache> C monitor(...) {}

to

public static <C extends AsyncCache> C monitor(...) {}

Due to the library maintaining strict semver, it should be safe to upgrade the required version clients use.

@izeye
Copy link
Contributor

izeye commented Mar 2, 2019

@ben-manes Thanks for the suggestion! I created #1255 to try to resolve this as suggested.

izeye added a commit to izeye/sample-micrometer-spring-boot that referenced this issue Mar 2, 2019
izeye added a commit to izeye/sample-micrometer-spring-boot that referenced this issue Mar 2, 2019
@shakuzen
Copy link
Member

shakuzen commented Mar 4, 2019

We'll want to note in our 1.2.0 release notes that Caffeine 2.7 or later is now required for the Caffeine caching metrics support.

@shakuzen shakuzen added this to the 1.2.0 milestone Mar 22, 2019
@shakuzen shakuzen added the enhancement A general enhancement label Mar 22, 2019
@shakuzen shakuzen added the release notes Noteworthy change to call out in the release notes label Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement release notes Noteworthy change to call out in the release notes
Projects
None yet
Development

No branches or pull requests

3 participants