@java.lang.annotation.Target({ ElementType.METHOD, ElementType.TYPE }) @java.lang.annotation.Retention(RetentionPolicy.RUNTIME) @java.lang.annotation.Inherited @java.lang.annotation.Documented @org.codehaus.groovy.transform.GroovyASTTransformationClass("org.grails.plugin.cache.compiler.CachePutTransformation") public @interface CachePut
Indicates that a method (or all methods on a class) trigger(s) aCache#put(Object, Object) operation. As opposed to Cacheable annotation, this annotation does not cause the target method to be skipped - rather it always causes the method to be invoked and its result to be placed into the cache.
Type | Name and Description |
---|---|
java.lang.String[] |
value Name of the caches in which the update takes place. |
Type | Name and Description |
---|---|
java.lang.Class[] |
key A closure for computing the key dynamically. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
A closure for computing the key dynamically.
Default is null, meaning all method parameters are considered as a key.
Name of the caches in which the update takes place.
May be used to determine the target cache (or caches), matching the qualifier value.