|CacheInvocationContext<A extends Annotation>|
A parameter to an intercepted method invocation.
|CacheKeyInvocationContext<A extends Annotation>|
|CacheMethodDetails<A extends Annotation>|
Thrown if an invalid cache annotation configuration is detected.
Marks a method argument as part of the cache key.
When a method annotated with
Marks the parameter to be cached for a method annotated with
CacheResultannotation, if the cache can satisfy the request a result is returned by the method from cache, not from method execution. For the mutative annotations such as
CacheResultthe annotation allows the cached value to be mutated so that it will be correct the next time
CacheResultis used. Any operations against a cache via an annotation will have the same behaviour as if the
CacheResultmethods were used. So if the same underlying cache is used for an annotation and a direct API call, the same data would be returned. Annotations therefore provide an additional API for interacting with caches. In order to use these annotations, you'll need a library or framework which processes these annotations and intercepts calls to your application objects to provide the caching behaviour. This would commonly be provided by a dependency injection framework such as defined by CDI in Java EE.
Copyright © 2013. All Rights Reserved.