Using JCache Annotations
Payara has the necessary interceptors implemented for allowing the full set of JCache annotations to be used.
The JCache annotations are as follows:
- @CachePut
-
Puts the specified key and value in the cache.
- @CacheRemove
-
Removes the specified key and value from the cache.
- @CacheResult
-
Retrieves the value associated with the specified key.
- @CacheRemoveAll
-
Removes all keys and values from the cache.
- @CacheDefaults
-
Allows the configuration of defaults for
CacheResult
,CachePut
,CacheRemove
, andCacheRemoveAll
at the class level. - @CacheKey
-
Marks a method parameter as the key of a cache.
- @CacheValue
-
Marks a method parameter as the value of a cache key.