-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #43302 [Cache] Commit items implicitly only when deferred keys ar…
…e 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
- Loading branch information
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters