We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8fc1bb commit 792b3c1Copy full SHA for 792b3c1
1 file changed
src/Database/Database.php
@@ -6799,12 +6799,16 @@ public function purgeCachedCollection(string $collectionId): bool
6799
* And related document reference in the collection cache.
6800
*
6801
* @param string $collectionId
6802
- * @param string $id
+ * @param string|null $id
6803
* @return bool
6804
* @throws Exception
6805
*/
6806
- public function purgeCachedDocument(string $collectionId, string $id): bool
+ public function purgeCachedDocument(string $collectionId, ?string $id): bool
6807
{
6808
+ if ($id === null){
6809
+ return true;
6810
+ }
6811
+
6812
[$collectionKey, $documentKey] = $this->getCacheKeys($collectionId, $id);
6813
6814
$this->cache->purge($collectionKey, $documentKey);
0 commit comments