Skip to content

Commit d6b1cdc

Browse files
committed
Custom cache annotations and AspectJ
This commit clarifies what should be done in order to use custom cache annotations with AspectJ. Issue: SPR-11503
1 parent 3c72849 commit d6b1cdc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/asciidoc/index.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47844,6 +47844,17 @@ using the aspectj mode in this case.
4784447844

4784547845
[[cache-annotation-stereotype]]
4784647846
==== Using custom annotations
47847+
47848+
.Custom annotation and AspectJ
47849+
****
47850+
This feature only works out-of-the-box with the proxy-based approach but can be enabled
47851+
with a bit of extra effort using AspectJ.
47852+
47853+
The `spring-aspects` module defines an aspect for the standard annotations only. If you
47854+
have defined your own annotations, you also need to define an aspect for those. Check
47855+
`AnnotationCacheAspect` for an example.
47856+
****
47857+
4784747858
The caching abstraction allows you to use your own annotations to identify what method
4784847859
triggers cache population or eviction. This is quite handy as a template mechanism as it
4784947860
eliminates the need to duplicate cache annotation declarations (especially useful if the

0 commit comments

Comments
 (0)