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

Replace guava cache with caffeine #3796

Closed
wants to merge 1 commit into from
Closed

Conversation

Sineaggi
Copy link
Contributor

Resolves #3759

return inferenceCache.getUnchecked(methodOrInitializerOrLambda);
} catch (UncheckedExecutionException e) {
return inferenceCache.get(methodOrInitializerOrLambda);
} catch (CompletionException e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@throws CompletionException if a checked exception was thrown while loading the value

CompletionFailure is a runtime exception, so I think that you can catch it directly?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. We want the CompletionFailure to propagate, so I don't think we need to the catch here at all anymore

copybara-service bot pushed a commit that referenced this pull request Feb 28, 2023
Resolves #3759

Fixes #3796

FUTURE_COPYBARA_INTEGRATE_REVIEW=#3796 from Sineaggi:fixes fffb316
PiperOrigin-RevId: 512664621
@Sineaggi Sineaggi deleted the fixes branch February 28, 2023 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal usage of guava and caffeine Cache seems inconsistent
3 participants