From 792b3c171d85b0c3ee97f92666dcd2024a8fae1d Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 19 Oct 2025 09:39:27 +0300 Subject: [PATCH 1/2] Skip null cache clear --- src/Database/Database.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Database/Database.php b/src/Database/Database.php index 512a6d828..2b560118d 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -6799,12 +6799,16 @@ public function purgeCachedCollection(string $collectionId): bool * And related document reference in the collection cache. * * @param string $collectionId - * @param string $id + * @param string|null $id * @return bool * @throws Exception */ - public function purgeCachedDocument(string $collectionId, string $id): bool + public function purgeCachedDocument(string $collectionId, ?string $id): bool { + if ($id === null){ + return true; + } + [$collectionKey, $documentKey] = $this->getCacheKeys($collectionId, $id); $this->cache->purge($collectionKey, $documentKey); From 64aab3d756c60ff2a2c114cf32c70a2573f3840c Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 19 Oct 2025 09:41:06 +0300 Subject: [PATCH 2/2] formatting --- src/Database/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Database.php b/src/Database/Database.php index 2b560118d..59871c6db 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -6805,7 +6805,7 @@ public function purgeCachedCollection(string $collectionId): bool */ public function purgeCachedDocument(string $collectionId, ?string $id): bool { - if ($id === null){ + if ($id === null) { return true; }