Package org.springframework.cache.interceptor

# Class CacheInterceptor

java.lang.Object
org.springframework.cache.interceptor.AbstractCacheInvoker
org.springframework.cache.interceptor.CacheAspectSupport
org.springframework.cache.interceptor.CacheInterceptor

All Implemented Interfaces:
  `Serializable`, `org.aopalliance.aop.Advice`, `org.aopalliance.intercept.Interceptor`, `org.aopalliance.intercept.MethodInterceptor`, `org.springframework.beans.factory.Aware`, `org.springframework.beans.factory.BeanFactoryAware`, `org.springframework.beans.factory.InitializingBean`, `org.springframework.beans.factory.SmartInitializingSingleton`

public class CacheInterceptor extends CacheAspectSupport implements org.aopalliance.intercept.MethodInterceptor, Serializable
AOP Alliance MethodInterceptor for declarative cache management using the common Spring caching infrastructure (`Cache`).

Derives from the `CacheAspectSupport` class which contains the integration with Spring's underlying caching API. CacheInterceptor simply calls the relevant superclass methods in the correct order.

CacheInterceptors are thread-safe.

Since:
  3.1
Author:
  Costin Leau, Juergen Hoeller, Sebastien Deleuze
See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class org.springframework.cache.interceptor.CacheAspectSupport

`CacheAspectSupport.CacheOperationContext, CacheAspectSupport.CacheOperationMetadata`

## Field Summary

### Fields inherited from class org.springframework.cache.interceptor.CacheAspectSupport

`IGNORE_REACTIVESTREAMS_PROPERTY_NAME, logger`

### Fields inherited from class org.springframework.cache.interceptor.AbstractCacheInvoker

`errorHandler`

## Constructor Summary

Constructors
Constructor
Description
`CacheInterceptor()`

## Method Summary

Modifier and Type
Method
Description
`Object`
`invoke(org.aopalliance.intercept.MethodInvocation invocation)`

### Methods inherited from class org.springframework.cache.interceptor.CacheAspectSupport

`afterPropertiesSet, afterSingletonsInstantiated, clearMetadataCache, configure, execute, getBean, getCacheOperationMetadata, getCacheOperationSource, getCacheResolver, getCaches, getKeyGenerator, getOperationContext, invokeOperation, methodIdentification, setBeanFactory, setCacheManager, setCacheOperationSource, setCacheOperationSources, setCacheResolver, setKeyGenerator`

### Methods inherited from class org.springframework.cache.interceptor.AbstractCacheInvoker

`doClear, doEvict, doGet, doGet, doPut, doRetrieve, doRetrieve, getErrorHandler, setErrorHandler`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CacheInterceptor

public CacheInterceptor()

## Method Details

### invoke

@Nullable public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable

Specified by:
  `invoke` in interface `org.aopalliance.intercept.MethodInterceptor`
Throws:
  `Throwable`