From d6b1cdc55fd8fc7b434add564b40b43fbc93fbd2 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 4 Aug 2014 17:26:01 +0200 Subject: [PATCH] Custom cache annotations and AspectJ This commit clarifies what should be done in order to use custom cache annotations with AspectJ. Issue: SPR-11503 --- src/asciidoc/index.adoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 0e16810922..2f64041b1d 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -47844,6 +47844,17 @@ using the aspectj mode in this case. [[cache-annotation-stereotype]] ==== Using custom annotations + +.Custom annotation and AspectJ +**** +This feature only works out-of-the-box with the proxy-based approach but can be enabled +with a bit of extra effort using AspectJ. + +The `spring-aspects` module defines an aspect for the standard annotations only. If you +have defined your own annotations, you also need to define an aspect for those. Check +`AnnotationCacheAspect` for an example. +**** + The caching abstraction allows you to use your own annotations to identify what method triggers cache population or eviction. This is quite handy as a template mechanism as it eliminates the need to duplicate cache annotation declarations (especially useful if the