Skip to content

Commit 71a306b

Browse files
committed
Fixed #497
1 parent e4ebf15 commit 71a306b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/phpFastCache/Helper/Psr16Adapter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ public function setMultiple($values, $ttl = null)
142142
try {
143143
foreach ($values as $key => $value) {
144144
$cacheItem = $this->internalCacheInstance->getItem($key)->set($value);
145+
if ($ttl) {
146+
$cacheItem->expiresAfter($ttl);
147+
}
145148
$this->internalCacheInstance->saveDeferred($cacheItem);
146149
unset($cacheItem);
147150
}

0 commit comments

Comments
 (0)