From b015164fae6e4c11f0b850df67688e198ddc76f8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 14 Jul 2026 18:55:42 +0200 Subject: [PATCH] fix(KeyValueCache): allow negative TTL for file locking file locking uses negative TTL, returning the default will break. Signed-off-by: Ferdinand Thiessen --- lib/private/Memcache/KeyValueCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Memcache/KeyValueCache.php b/lib/private/Memcache/KeyValueCache.php index 9125290d801f4..fd47bbc95c5e4 100644 --- a/lib/private/Memcache/KeyValueCache.php +++ b/lib/private/Memcache/KeyValueCache.php @@ -232,7 +232,7 @@ protected function evalLua(string $scriptName, array $keys, array $args) { * so fall back to the default and cap it to the maximum. */ private function normalizeTtl(int $ttl): int { - if ($ttl <= 0) { + if ($ttl === 0) { // we need to allow negative TTL for file locking $ttl = self::DEFAULT_TTL; } return min($ttl, self::MAX_TTL);