Class CacheGetInterceptor


  • @Interceptor
    @Priority(1005)
    public class CacheGetInterceptor
    extends AbstractCacheInterceptor
    A CDI interceptor that returns cached value if present; otherwise it returns and caches result of target method invocation.
    • Method Detail

      • cacheGet

        public Object cacheGet​(javax.interceptor.InvocationContext ctxInvocation)
                        throws Exception
        Returns cached value if available; otherwise invokes target method and stores invocation result in the cache before returning it.
        Parameters:
        ctxInvocation - the invocation context
        Returns:
        the cached value if available; otherwise returns the result of the invocation of the target method
        Throws:
        Exception - if thrown by target method