接口的使用
org.springframework.cache.interceptor.CacheResolver
使用CacheResolver的程序包 程序包 说明 org.springframework.cache.annotation Annotations and supporting classes for declarative cache management.org.springframework.cache.interceptor AOP-based solution for declarative caching demarcation.org.springframework.cache.jcache.config Support package for declarative JSR-107 caching configuration.org.springframework.cache.jcache.interceptor AOP-based solution for declarative caching demarcation using JSR-107 annotations.org.springframework.cache.annotation中CacheResolver的使用
类型参数类型为CacheResolver的org.springframework.cache.annotation中的字段 修饰符和类型 字段 说明 protected Supplier<CacheResolver>
AbstractCachingConfiguration. cacheResolver
返回CacheResolver的org.springframework.cache.annotation中的方法 修饰符和类型 方法 说明 CacheResolver
CachingConfigurer. cacheResolver()
Return theCacheResolver
bean to use to resolve regular caches for annotation-driven cache management.CacheResolver
CachingConfigurerSupport. cacheResolver()
org.springframework.cache.interceptor中CacheResolver的使用
实现CacheResolver的org.springframework.cache.interceptor中的类 修饰符和类型 类 说明 class
AbstractCacheResolver
A baseCacheResolver
implementation that requires the concrete implementation to provide the collection of cache name(s) based on the invocation context.class
NamedCacheResolver
ACacheResolver
that forces the resolution to a configurable collection of name(s) against a givenCacheManager
.class
SimpleCacheResolver
A simpleCacheResolver
that resolves theCache
instance(s) based on a configurableCacheManager
and the name of the cache(s) as provided bygetCacheNames()
.返回CacheResolver的org.springframework.cache.interceptor中的方法 修饰符和类型 方法 说明 CacheResolver
CacheAspectSupport. getCacheResolver()
Return the defaultCacheResolver
that this cache aspect delegates to.参数类型为CacheResolver的org.springframework.cache.interceptor中的方法 修饰符和类型 方法 说明 protected Collection<? extends Cache>
CacheAspectSupport. getCaches(CacheOperationInvocationContext<CacheOperation> context, CacheResolver cacheResolver)
void
CacheAspectSupport. setCacheResolver(CacheResolver cacheResolver)
Set the defaultCacheResolver
that this cache aspect should delegate to if no specific cache resolver has been set for the operation.void
CacheProxyFactoryBean. setCacheResolver(CacheResolver cacheResolver)
Set the defaultCacheResolver
that this cache aspect should delegate to if no specific cache resolver has been set for the operation.参数类型为CacheResolver的org.springframework.cache.interceptor中的构造器 构造器 说明 CacheOperationMetadata(CacheOperation operation, Method method, Class<?> targetClass, KeyGenerator keyGenerator, CacheResolver cacheResolver)
org.springframework.cache.jcache.config中CacheResolver的使用
类型参数类型为CacheResolver的org.springframework.cache.jcache.config中的字段 修饰符和类型 字段 说明 protected Supplier<CacheResolver>
AbstractJCacheConfiguration. exceptionCacheResolver
返回CacheResolver的org.springframework.cache.jcache.config中的方法 修饰符和类型 方法 说明 CacheResolver
JCacheConfigurer. exceptionCacheResolver()
Return theCacheResolver
bean to use to resolve exception caches for annotation-driven cache management.CacheResolver
JCacheConfigurerSupport. exceptionCacheResolver()
org.springframework.cache.jcache.interceptor中CacheResolver的使用
实现CacheResolver的org.springframework.cache.jcache.interceptor中的类 修饰符和类型 类 说明 class
SimpleExceptionCacheResolver
A simpleCacheResolver
that resolves the exception cache based on a configurableCacheManager
and the name of the cache:CacheResultOperation.getExceptionCacheName()
.返回CacheResolver的org.springframework.cache.jcache.interceptor中的方法 修饰符和类型 方法 说明 protected CacheResolver
AnnotationJCacheOperationSource. getCacheResolver(javax.cache.annotation.CacheResolverFactory factory, javax.cache.annotation.CacheMethodDetails<?> details)
CacheResolver
DefaultJCacheOperationSource. getCacheResolver()
Return the specified cache resolver to use, if any.CacheResolver
JCacheOperation. getCacheResolver()
Return theCacheResolver
instance to use to resolve the cache to use for this operation.protected abstract CacheResolver
AnnotationJCacheOperationSource. getDefaultCacheResolver()
Return the defaultCacheResolver
if none is set.protected CacheResolver
DefaultJCacheOperationSource. getDefaultCacheResolver()
protected abstract CacheResolver
AnnotationJCacheOperationSource. getDefaultExceptionCacheResolver()
Return the default exceptionCacheResolver
if none is set.protected CacheResolver
DefaultJCacheOperationSource. getDefaultExceptionCacheResolver()
protected CacheResolver
AnnotationJCacheOperationSource. getExceptionCacheResolver(javax.cache.annotation.CacheResolverFactory factory, javax.cache.annotation.CacheMethodDetails<javax.cache.annotation.CacheResult> details)
CacheResolver
DefaultJCacheOperationSource. getExceptionCacheResolver()
Return the specified exception cache resolver to use, if any.参数类型为CacheResolver的org.springframework.cache.jcache.interceptor中的方法 修饰符和类型 方法 说明 void
DefaultJCacheOperationSource. setCacheResolver(CacheResolver cacheResolver)
Set theCacheResolver
to resolve regular caches.void
DefaultJCacheOperationSource. setExceptionCacheResolver(CacheResolver exceptionCacheResolver)
Set theCacheResolver
to resolve exception caches.