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] Commit items implicitly only when deferred keys are requested#43302

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

Merged
nicolas-grekas merged 1 commit intosymfony:4.4fromsbelyshkin:fix-deffered-save
Oct 6, 2021

Conversation

@sbelyshkin
Copy link
Contributor

@sbelyshkinsbelyshkin commentedOct 3, 2021
edited
Loading

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

Because of implicit commits before getting any item, deferred saves are useless.

for($r=0; $r<10; ++$r) {    $item = $adapter->getItem('Key'.$r); // implicit commit    $item->set('Value'.$r);    $adapter->saveDeferred($item);}$adapter->commit(); // nothing to commit :-//

Let's commit deferred changes only when requested item was deferred previously.

simonberger reacted with thumbs up emoji
@simonberger
Copy link
Contributor

Very nice find ! This is also an issue already in 4.4.

@sbelyshkin
Copy link
ContributorAuthor

It may be rebased or cherry-picked to 4.4.

@sbelyshkinsbelyshkin changed the base branch from5.3 to4.4October 5, 2021 14:36
@nicolas-grekasnicolas-grekas modified the milestones:5.3,4.4Oct 6, 2021
@nicolas-grekas
Copy link
Member

Thank you@sbelyshkin.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

@sbelyshkin@simonberger@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp