Class CacheAspectSupport

java.lang.Object
org.springframework.cache.interceptor.AbstractCacheInvoker
org.springframework.cache.interceptor.CacheAspectSupport
All Implemented Interfaces:
Aware, BeanFactoryAware, InitializingBean, SmartInitializingSingleton
Direct Known Subclasses:
CacheInterceptor

public abstract class CacheAspectSupport extends AbstractCacheInvoker implements BeanFactoryAware, InitializingBean, SmartInitializingSingleton
Base class for caching aspects, such as the CacheInterceptor or an AspectJ aspect.

This enables the underlying Spring caching infrastructure to be used easily to implement an aspect for any aspect system.

Subclasses are responsible for calling relevant methods in the correct order.

Uses the Strategy design pattern. A CacheOperationSource is used for determining caching operations, a KeyGenerator will build the cache keys, and a CacheResolver will resolve the actual cache(s) to use.

Note: A cache aspect is serializable but does not perform any actual caching after deserialization.

Since:
3.1
Author:
Costin Leau, Juergen Hoeller, Chris Beams, Phillip Webb, Sam Brannen, Stephane Nicoll