## 接口的使用
org.springframework.cache.interceptor.CacheOperationSource

- 使用CacheOperationSource的程序包
  程序包 | 说明
  --- | ---
  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.annotation中CacheOperationSource的使用

    实现CacheOperationSource的org.springframework.cache.annotation中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `AnnotationCacheOperationSource` Implementation of the `CacheOperationSource` interface for working with caching metadata in annotation format.

    返回CacheOperationSource的org.springframework.cache.annotation中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `CacheOperationSource` | ProxyCachingConfiguration.`cacheOperationSource()`

  - ### org.springframework.cache.interceptor中CacheOperationSource的使用

    实现CacheOperationSource的org.springframework.cache.interceptor中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `AbstractFallbackCacheOperationSource` Abstract implementation of `CacheOperation` that caches attributes for methods and implements a fallback policy: 1. specific target method; 2. target class; 3. declaring method; 4. declaring class/interface.
    `class` | `CompositeCacheOperationSource` Composite `CacheOperationSource` implementation that iterates over a given array of `CacheOperationSource` instances.
    `class` | `NameMatchCacheOperationSource` Simple `CacheOperationSource` implementation that allows attributes to be matched by registered name.

    返回CacheOperationSource的org.springframework.cache.interceptor中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `CacheOperationSource` | CacheAspectSupport.`getCacheOperationSource()` Return the CacheOperationSource for this cache aspect.
    `CacheOperationSource[]` | CompositeCacheOperationSource.`getCacheOperationSources()` Return the `CacheOperationSource` instances that this `CompositeCacheOperationSource` combines.

    参数类型为CacheOperationSource的org.springframework.cache.interceptor中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | BeanFactoryCacheOperationSourceAdvisor.`setCacheOperationSource(CacheOperationSource cacheOperationSource)` Set the cache operation attribute source which is used to find cache attributes.
    `void` | CacheAspectSupport.`setCacheOperationSources(CacheOperationSource... cacheOperationSources)` Set one or more cache operation sources which are used to find the cache attributes.
    `void` | CacheProxyFactoryBean.`setCacheOperationSources(CacheOperationSource... cacheOperationSources)` Set one or more sources to find cache operations.

    参数类型为CacheOperationSource的org.springframework.cache.interceptor中的构造器
    构造器和说明
    `CompositeCacheOperationSource(CacheOperationSource... cacheOperationSources)` Create a new CompositeCacheOperationSource for the given sources.