mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Add to finally
This commit is contained in:
parent
19667f78a9
commit
cd0d1d94db
1 changed files with 5 additions and 6 deletions
|
|
@ -197,13 +197,12 @@ class Databases extends Action
|
||||||
throw $e;
|
throw $e;
|
||||||
} finally {
|
} finally {
|
||||||
$this->trigger($database, $collection, $attribute, $project, $projectId, $events);
|
$this->trigger($database, $collection, $attribute, $project, $projectId, $events);
|
||||||
}
|
if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) {
|
||||||
|
$dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId());
|
||||||
|
}
|
||||||
|
|
||||||
if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) {
|
$dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId);
|
||||||
$dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -426,9 +425,9 @@ class Databases extends Action
|
||||||
throw $e;
|
throw $e;
|
||||||
} finally {
|
} finally {
|
||||||
$this->trigger($database, $collection, $index, $project, $projectId, $events);
|
$this->trigger($database, $collection, $index, $project, $projectId, $events);
|
||||||
|
$dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue