Skip to content

Support @CacheConfig("myCacheName") declarations for simplified configuration #35152

Closed
@sbrannen

Description

@sbrannen

Overview

The @CacheConfig section of the reference manual provides an example that declares @CacheConfig("books").

However, unlike the @Cacheable, @CachePut, and @CacheEvict annotations, @CacheConfig currently does not have a value alias for the cacheNames attribute. Thus, the example in the reference manual does not compile, and @CacheConfig(cacheNames = "books") would be the supported way to declare that.

The driving factor for this issue is therefore to provide a simplified and consistent programming model for users that only need to define default cache names at the type level (like in the existing example in the reference manual).

To address that, we should introduce a value alias for cacheNames in @CacheConfig.

Related Issues

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions