Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Cache][Messenger] fixed CallbackInterface support in async expiration handler#49422

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@AdamKatzDev
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

Adds support for CallbackInterface in EarlyExpirationHandler and thus fixes async cache recomputing for callables that implement CallbackInterface. Earlier similar errors were fixed in#31879.

@carsonbotcarsonbot added this to the5.4 milestoneFeb 17, 2023
@carsonbotcarsonbot changed the title[Messenger][Cache] fixed CallbackInterface support in async expiration handler[Cache][Messenger] fixed CallbackInterface support in async expiration handlerFeb 17, 2023
$pool =$message->findPool($this->reverseContainer);
$callback =$message->findCallback($this->reverseContainer);
$value =$callback($item);
$save =true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

shouldn't this implement the handling of this$save flag ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

My guess is at this point this is not needed since it was specifically asked to recalculate the cache item asynchronously.
There could be some use cases that I miss though.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It does look like I am doing something wrong here. But I am also guessing if handling$save will make things worse for someone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@nicolas-grekas can you give your opinion on this ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

My guess is at this point this is not needed since it was specifically asked to recalculate the cache item asynchronously.

Correct!

@nicolas-grekas
Copy link
Member

Thank you@AdamKatzDev.

@nicolas-grekasnicolas-grekas merged commite9bd2ab intosymfony:5.4Feb 21, 2023
This was referencedFeb 28, 2023
@AdamKatzDevAdamKatzDev deleted the fix/async_expiration_handler_callback_interface_support branchMarch 2, 2023 18:36
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@stofstofstof left review comments

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@AdamKatzDev@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp