Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching and Event Listening support do not reuse internal delegates for their evaluation contexts #31617

Closed
snicoll opened this issue Nov 17, 2023 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Nov 17, 2023

The work on #31579 and the report #31580 (ping @liudaac) led to an investigation that shows the context does not reuse the internal delegates as it should.

The way StandardEvaluationContext is used in the cache abstraction is a bit counter-intuitive as its root object is invocation specific (with method & all), while the context is meant to be shared so that its delegates are not constantly recreated.

@snicoll snicoll added the type: bug A general bug label Nov 17, 2023
@snicoll snicoll added this to the 6.0.15 milestone Nov 17, 2023
@snicoll snicoll self-assigned this Nov 17, 2023
@snicoll snicoll modified the milestones: 6.0.15, 6.1.1 Nov 17, 2023
@sbrannen sbrannen changed the title CacheEvaluationContext does not reuse internal delegates CacheEvaluationContext does not reuse internal delegates Nov 17, 2023
snicoll added a commit to snicoll/spring-framework that referenced this issue Nov 17, 2023
@jhoeller jhoeller added the in: core Issues in core modules (aop, beans, core, context, expression) label Nov 17, 2023
@snicoll snicoll added type: enhancement A general enhancement and removed type: bug A general bug labels Nov 17, 2023
snicoll added a commit to snicoll/spring-framework that referenced this issue Nov 17, 2023
@snicoll
Copy link
Member Author

snicoll commented Nov 17, 2023

The @EventListener is also impacted by this.

@snicoll snicoll changed the title CacheEvaluationContext does not reuse internal delegates Caching and Event Listening support do not reuse internal delegates for their evaluation contexts Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants