@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.CacheableTransformation") public @interface Cacheable
Indicates that a method (or all the methods on a class) can be cached.
The method arguments and signature are used for computing the key while the returned instance is used as the cache value.
Type | Name and Description |
---|---|
java.lang.String[] |
value Name of the caches in which the update takes place. |
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 used for conditioning the method caching.
Default is null, meaning the method is always cached.
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.