-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Correct invalid @CacheConfig snippet in documentation #35096
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
base: main
Are you sure you want to change the base?
Correct invalid @CacheConfig snippet in documentation #35096
Conversation
Signed-off-by: Junnyjun <chbe5082@naver.com>
Good catch, @Junnyjun. 👍 The documentation is certainly incorrect, though in all fairness, the rest of the cache-related annotations such as So, I assume:
|
To address that, I've add a |
Prior to this commit @CacheConfig did not have a `value` attribute alias for `cacheNames`, even though the rest of the cache-related annotations (such as @Cacheable, @CachePut, etc.) do have a `value` / `cacheNames` alias pair. To address that inconsistency, this commit introduces a `value` alias for `cacheNames` in @CacheConfig as well. See gh-35096 Closes gh-35152
Hello @sbrannen, Thank you for your detailed explanation regarding the also appreciate you creating and completing PR #35152 to address this issue more fundamentally by introducing value alias for this Pull Request (#35096) is no longer necessary, as the core problem will be resolved by PR #35152, so will proceed to close this PR. |
Hi @Junnyjun, We still plan to fix the broken documentation example for However, I see that you already closed this PR and removed your branch. Would you like to try to reopen this PR (or create a new one)? If not, just let us know, and we'll make the change on Thanks, Sam |
Reopening to address the documentation issue in |
I accidentally deleted branch it by pressing the wrong button, but I quickly recovered it |
The PR has been reopened 😅 |
Original example used
@CacheConfig("books")
, which leads to a runtime error because the annotation requires cacheNames to be explicitly defined.This PR updates the annotation to
@CacheConfig(cacheNames = "books")
for correctness.