+ fix failing cache tests
+ renamed afterInvocation to beforeInvocation (and changed the docs and tests accordingly)
This commit is contained in:
@@ -53,7 +53,7 @@ public class AnnotatedClassCacheableService implements CacheableService<Object>
|
||||
public void evictAll(Object arg1) {
|
||||
}
|
||||
|
||||
@CacheEvict(value = "default", afterInvocation = false)
|
||||
@CacheEvict(value = "default", beforeInvocation = true)
|
||||
public void evictEarly(Object arg1) {
|
||||
throw new RuntimeException("exception thrown - evict should still occur");
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class AnnotatedClassCacheableService implements CacheableService<Object>
|
||||
public void evict(Object arg1, Object arg2) {
|
||||
}
|
||||
|
||||
@CacheEvict(value = "default", key = "#p0", afterInvocation = false)
|
||||
@CacheEvict(value = "default", key = "#p0", beforeInvocation = true)
|
||||
public void invalidateEarly(Object arg1, Object arg2) {
|
||||
throw new RuntimeException("exception thrown - evict should still occur");
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class DefaultCacheableService implements CacheableService<Long> {
|
||||
public void evictAll(Object arg1) {
|
||||
}
|
||||
|
||||
@CacheEvict(value = "default", afterInvocation = false)
|
||||
@CacheEvict(value = "default", beforeInvocation = true)
|
||||
public void evictEarly(Object arg1) {
|
||||
throw new RuntimeException("exception thrown - evict should still occur");
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class DefaultCacheableService implements CacheableService<Long> {
|
||||
public void evict(Object arg1, Object arg2) {
|
||||
}
|
||||
|
||||
@CacheEvict(value = "default", key = "#p0", afterInvocation = false)
|
||||
@CacheEvict(value = "default", key = "#p0", beforeInvocation = true)
|
||||
public void invalidateEarly(Object arg1, Object arg2) {
|
||||
throw new RuntimeException("exception thrown - evict should still occur");
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<cache:cache-evict method="invalidate" cache="default"/>
|
||||
<cache:cache-evict method="evict" key="#p0" cache="default"/>
|
||||
<cache:cache-evict method="evictWithException" cache="default"/>
|
||||
<cache:cache-evict method="evictEarly" cache="default" after-invocation="false"/>
|
||||
<cache:cache-evict method="invalidateEarly" key="#p0" cache="default" after-invocation="false"/>
|
||||
<cache:cache-evict method="evictEarly" cache="default" before-invocation="true"/>
|
||||
<cache:cache-evict method="invalidateEarly" key="#p0" cache="default" before-invocation="true"/>
|
||||
<cache:cache-evict method="evictAll" cache="default" all-entries="true"/>
|
||||
</cache:caching>
|
||||
<cache:caching cache="default">
|
||||
@@ -60,8 +60,8 @@
|
||||
<cache:cache-evict method="invalidate" cache="default"/>
|
||||
<cache:cache-evict method="evict" key="#p0" cache="default"/>
|
||||
<cache:cache-evict method="evictWithException" cache="default"/>
|
||||
<cache:cache-evict method="evictEarly" cache="default" after-invocation="false"/>
|
||||
<cache:cache-evict method="invalidateEarly" key="#p0" cache="default" after-invocation="false"/>
|
||||
<cache:cache-evict method="evictEarly" cache="default" before-invocation="true"/>
|
||||
<cache:cache-evict method="invalidateEarly" key="#p0" cache="default" before-invocation="true"/>
|
||||
<cache:cache-evict method="evictAll" cache="default" all-entries="true"/>
|
||||
</cache:caching>
|
||||
<cache:caching cache="default">
|
||||
|
||||
Reference in New Issue
Block a user