mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Delete related cache on finally
This commit is contained in:
parent
a7a3d85bcb
commit
4de45bf9a7
1 changed files with 4 additions and 1 deletions
|
|
@ -119,7 +119,6 @@ class DatabaseV1 extends Worker
|
|||
if ($options['twoWay']) {
|
||||
$relatedAttribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']);
|
||||
$dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'available'));
|
||||
$dbForProject->deleteCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -159,6 +158,10 @@ class DatabaseV1 extends Worker
|
|||
);
|
||||
}
|
||||
|
||||
if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) {
|
||||
$dbForProject->deleteCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId());
|
||||
}
|
||||
|
||||
$dbForProject->deleteCachedDocument('database_' . $database->getInternalId(), $collectionId);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue