Skip to content

Commit 1c43880

Browse files
committed
minor symfony#53329 [Cache] Fix Couchbase expiration test (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [Cache] Fix Couchbase expiration test | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT We changed for a datetime instance because older versions of Couchbase supported an expiration time in seconds only if it was < 30 days. But this limit was raised to 50 years, so I suggest we go back to basics and only provide an integer. Commits ------- ee6dd40 [Cache] Fix Couchbase expiration test
2 parents 378e5d8 + ee6dd40 commit 1c43880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Cache/Adapter/CouchbaseCollectionAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected function doSave(array $values, $lifetime): array|bool
183183
}
184184

185185
$upsertOptions = new UpsertOptions();
186-
$upsertOptions->expiry(\DateTimeImmutable::createFromFormat('U', time() + $lifetime));
186+
$upsertOptions->expiry($lifetime);
187187

188188
$ko = [];
189189
foreach ($values as $key => $value) {

0 commit comments

Comments
 (0)