spring-framework / org.springframework.cache.annotation

Package org.springframework.cache.annotation

Types

AnnotationCacheOperationSource

open class AnnotationCacheOperationSource : AbstractFallbackCacheOperationSource, Serializable

Implementation of the org.springframework.cache.interceptor.CacheOperationSource interface for working with caching metadata in annotation format.

This class reads Spring's Cacheable, CachePut and CacheEvict annotations and exposes corresponding caching operation definition to Spring's cache infrastructure. This class may also serve as base class for a custom CacheOperationSource.

CachingConfigurationSelector

open class CachingConfigurationSelector : AdviceModeImportSelector<EnableCaching>

Selects which implementation of AbstractCachingConfiguration should be used based on the value of EnableCaching#mode on the importing @Configuration class.

Detects the presence of JSR-107 and enables JCache support accordingly.

CachingConfigurerSupport

open class CachingConfigurerSupport : CachingConfigurer

An implementation of CachingConfigurer with empty methods allowing sub-classes to override only the methods they're interested in.

ProxyCachingConfiguration

open class ProxyCachingConfiguration : AbstractCachingConfiguration

@Configuration class that registers the Spring infrastructure beans necessary to enable proxy-based annotation-driven cache management.

SpringCacheAnnotationParser

open class SpringCacheAnnotationParser : CacheAnnotationParser, Serializable

Strategy implementation for parsing Spring's Caching, Cacheable, CacheEvict, and CachePut annotations.

Annotations

CachePut

class CachePut

Annotation indicating that a method (or all methods on a class) triggers a cache put operation.

In contrast to the Cacheable annotation, this annotation does not cause the advised method to be skipped. Rather, it always causes the method to be invoked and its result to be stored in the associated cache. Note that Java8's Optional return types are automatically handled and its content is stored in the cache if present.

This annotation may be used as a meta-annotation to create custom composed annotations with attribute overrides.

Caching

class Caching

Group annotation for multiple cache annotations (of different or the same type).

This annotation may be used as a meta-annotation to create custom composed annotations with attribute overrides.