Skip to content

Cacheable javadoc wrongly explains how cache keys are generated [SPR-11736] #16358

@spring-projects-issues

Description

@spring-projects-issues

Lari Hotari opened SPR-11736 and commented

In Cacheable's javadoc , it says:

Annotation indicating that a method (or all the methods on a class) can be cached.
The method arguments and signature are used for computing the key while the returned instance is used as the cache value.

Method signature is ignored in SimpleKeyGenerator .

Perhaps the target instance's identityHashCode should be part of the key besides the method signature in SimpleKeyGenerator by default.

I'll send a PR which now contains the broken unit test for this problem.


Affects: 4.0.3

Issue Links:

Referenced from: commits 90081f7

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions