Class JCacheInterceptor

All Implemented Interfaces:
Serializable, Advice, Interceptor, MethodInterceptor, InitializingBean

public class JCacheInterceptor extends JCacheAspectSupport implements MethodInterceptor, Serializable
AOP Alliance MethodInterceptor for declarative cache management using JSR-107 caching annotations.

Derives from the JCacheAspectSupport class which contains the integration with Spring's underlying caching API. JCacheInterceptor simply calls the relevant superclass method.

JCacheInterceptors are thread-safe.

Since:
4.1
Author:
Stephane Nicoll, Juergen Hoeller
See Also:
  • Constructor Details

    • JCacheInterceptor

      public JCacheInterceptor()
      Construct a new JCacheInterceptor with the default error handler.
    • JCacheInterceptor

      public JCacheInterceptor(@Nullable Supplier<CacheErrorHandler> errorHandler)
      Construct a new JCacheInterceptor with the given error handler.
      Parameters:
      errorHandler - a supplier for the error handler to use, applying the default error handler if the supplier is not resolvable
      Since:
      5.1
  • Method Details