You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #43302 [Cache] Commit items implicitly only when deferred keys are requested (Sergey Belyshkin)
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Commit items implicitly only when deferred keys are requested
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| 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.
Commits
-------
2e8c446 [Cache] Commit items implicitly only when deferred keys are requested
0 commit comments