Skip to content

Commit 2289b69

Browse files
Nyholmnicolas-grekas
authored andcommitted
[Cache][Contracts] We must save the item or the trait does not have any effect
1 parent 396ab37 commit 2289b69

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

GetForCacheItemPoolTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function get(string $key, callable $callback, float $beta = null)
3636
if (INF === $beta || !$item->isHit()) {
3737
$value = $callback($item);
3838
$item->set($value);
39+
$this->save($item);
3940
}
4041

4142
return $item->get();

0 commit comments

Comments
 (0)