Skip to content

Generate cache key with loadContext. #78

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

Merged
merged 2 commits into from
Feb 26, 2021
Merged

Conversation

qzchenwl
Copy link
Contributor

When result depends on both key and context, i.e. load(key, context), cacheKey should depend on context.

Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

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

Please add the JavaDoc asked for and we can merge this


default Object getKeyWithContext(K input, Object context) {
return getKey(input);
}
Copy link
Member

Choose a reason for hiding this comment

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

This is a great PR - simple and powerful.

Can you put Javadoc on this method and I will merge it

Copy link
Contributor Author

@qzchenwl qzchenwl Feb 19, 2021

Choose a reason for hiding this comment

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

JavaDoc is added now. @bbakerman

@qzchenwl
Copy link
Contributor Author

@bbakerman I've added the JavaDoc, you can merge this.

@bbakerman bbakerman merged commit dd7d81f into graphql-java:master Feb 26, 2021
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.

2 participants