Skip to content

Wrong IllegalStateException for @Cacheable without a cache name [SPR-13081] #17672

@spring-projects-issues

Description

@spring-projects-issues

Stéphane Nicoll opened SPR-13081 and commented

In 4.1, we've relaxed the structure of caching annotations so that they don't need to refer to any name at all. The name(s) can be provided by a CacheConfig annotation at class level for instance or via a custom CacheResolver that retrieves the cache names using a custom algorithm.

Unfortunately, we are still validating that at least one cache names is specified per operation and we throw an IllegalStateException if that's not the case: it prevent the CacheResolver use case to be used in practice.


Referenced from: commits daf12a9, 08c032d

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions