From 7f247a6b271c804d6c513b066811a8b4b0805938 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Mon, 9 May 2011 17:40:23 +0000 Subject: [PATCH] SPR-8256 + doc updates --- spring-framework-reference/src/cache.xml | 27 +++++++----------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/spring-framework-reference/src/cache.xml b/spring-framework-reference/src/cache.xml index b1a3ac9b1c..2d3a2216dc 100644 --- a/spring-framework-reference/src/cache.xml +++ b/spring-framework-reference/src/cache.xml @@ -159,7 +159,7 @@ public Book findBook(String name)]]> Cache SpEL available metadata - + @@ -249,8 +249,10 @@ public void loadBooks(InputStream batch)]]> xmlns:cache="http://www.springframework.org/schema/cache"http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd]]> - ]]> + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd]]> + http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd]]> + ]]> +]]> The namespace allows various options to be specified that influence the way the caching behaviour is added to the application through AOP. The configuration is similar (on purpose) with that of tx:annotation-driven: @@ -293,7 +295,7 @@ public void loadBooks(InputStream batch)]]> proxy semantics, as discussed above, applying to method calls coming in through the proxy only). The alternative mode "aspectj" instead weaves the affected classes with Spring's - AspectJ transaction aspect, modifying the target class byte + AspectJ caching aspect, modifying the target class byte code to apply to any kind of method call. AspectJ weaving requires spring-aspects.jar in the classpath as well as load-time weaving (or compile-time weaving) enabled. (See @@ -307,7 +309,7 @@ public void loadBooks(InputStream batch)]]> false Applies to proxy mode only. Controls what type of - transactional proxies are created for classes annotated with + caching proxies are created for classes annotated with the @Cacheable or @CacheEvict annotations. If the proxy-target-class attribute is set to true, then class-based proxies are @@ -336,20 +338,7 @@ public void loadBooks(InputStream batch)]]>
- - The proxy-target-class attribute on the - <cache:annotation-driven/> element controls what - type of caching proxies are created for classes annotated with - the @Cacheable/@CacheEvict annotation. If - proxy-target-class attribute is set to - true, class-based proxies are created. If - proxy-target-class is false or - if the attribute is omitted, standard JDK interface-based proxies are - created. (See for a discussion of the - different proxy types.) - - - + <cache:annotation-driven/> only looks for @Cacheable/@CacheEvict on beans in the same application context it is defined in. This means that, if you put -- GitLab