-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix explicit composite cache key elements values and improve doc #11046
Fix explicit composite cache key elements values and improve doc #11046
Conversation
docs/src/main/asciidoc/cache.adoc
Outdated
@@ -327,6 +327,49 @@ method annotated with `@CacheResult` or `@CacheInvalidate`. | |||
|
|||
This annotation is optional and should only be used when some of the method arguments are NOT part of the cache key. | |||
|
|||
=== Composite cache key building logic | |||
|
|||
When a cache key is built from several method arguments, whether they are explicitly identified with `@CacheKey` or not, the building logic depends on these arguments order in the method signature. On the other hand, the arguments names are not used at all and do not have any effect on the cache key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a cache key is built from several method arguments, whether they are explicitly identified with `@CacheKey` or not, the building logic depends on these arguments order in the method signature. On the other hand, the arguments names are not used at all and do not have any effect on the cache key. | |
When a cache key is built from several method arguments, whether they are explicitly identified with `@CacheKey` or not, the building logic depends on the order of these arguments in the method signature. On the other hand, the arguments names are not used at all and do not have any effect on the cache key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I added a small doc suggestion
304c08a
to
133263b
Compare
Suggestion applied, thanks for the review @geoand! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks!
Fixes #10436.
cc @gsmet @geoand