CacheInterceptor (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.cache.interceptor

## Class CacheInterceptor

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

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

      public class CacheInterceptor
      extends CacheAspectSupport
      implements 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
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `CacheAspectSupport.CacheOperationContext, CacheAspectSupport.Invoker`

  - ### Field Summary

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

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheInterceptor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `invoke(MethodInvocation invocation)`

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

      `afterPropertiesSet, execute, getCacheManager, getCacheOperationSource, getCaches, getKeyGenerator, getOperationContext, methodIdentification, setCacheManager, setCacheOperationSources, setKeyGenerator`

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

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

- - ### Constructor Detail

    - #### CacheInterceptor

          public CacheInterceptor()

  - ### Method Detail

    - #### invoke

          public Object invoke(MethodInvocation invocation)
                        throws Throwable

      Specified by:
        `invoke` in interface `MethodInterceptor`
      Throws:
        `Throwable`