Skip to content

Commit 792b3c1

Browse files
committed
Skip null cache clear
1 parent d8fc1bb commit 792b3c1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Database/Database.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6799,12 +6799,16 @@ public function purgeCachedCollection(string $collectionId): bool
67996799
* And related document reference in the collection cache.
68006800
*
68016801
* @param string $collectionId
6802-
* @param string $id
6802+
* @param string|null $id
68036803
* @return bool
68046804
* @throws Exception
68056805
*/
6806-
public function purgeCachedDocument(string $collectionId, string $id): bool
6806+
public function purgeCachedDocument(string $collectionId, ?string $id): bool
68076807
{
6808+
if ($id === null){
6809+
return true;
6810+
}
6811+
68086812
[$collectionKey, $documentKey] = $this->getCacheKeys($collectionId, $id);
68096813

68106814
$this->cache->purge($collectionKey, $documentKey);

0 commit comments

Comments
 (0)