Revert "Purge project cache after project settings updates"

This reverts commit 47e60535fb.
This commit is contained in:
Prem Palanisamy committed 2026-06-10 10:51:17 +01:00
1 parent 47e60535fb
commit e638394e1d
21 files changed
+1 -26

No files matched your search

-3
View File
@@ -59,7 +59,6 @@ Http::patch('/v1/projects/:projectId/oauth2')
}
$project = $dbForPlatform->updateDocument('projects', $project->getId(), $project->setAttribute('oAuthProviders', $providers));
$dbForPlatform->purgeCachedDocument('projects', $project->getId());
$response->dynamic($project, Response::MODEL_PROJECT);
});
@@ -94,7 +93,6 @@ Http::patch('/v1/projects/:projectId/auth/mock-numbers')
$auths['mockNumbers'] = $numbers;
$project = $dbForPlatform->updateDocument('projects', $project->getId(), $project->setAttribute('auths', $auths));
$dbForPlatform->purgeCachedDocument('projects', $project->getId());
$response->dynamic($project, Response::MODEL_PROJECT);
});
@@ -122,7 +120,6 @@ Http::delete('/v1/projects/:projectId/templates/email')
unset($templates['email.' . $type . '-' . $locale]);
$project = $dbForPlatform->updateDocument('projects', $project->getId(), $project->setAttribute('templates', $templates));
$dbForPlatform->purgeCachedDocument('projects', $project->getId());
$response->noContent();
});
@@ -82,7 +82,6 @@ class Update extends Action
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), new Document([
'auths' => $auths,
])));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('methodId', $methodId);
@@ -71,7 +71,6 @@ class Update extends Action
$labels = (array) \array_values(\array_unique($labels));
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), new Document(['labels' => $labels])));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$response->dynamic($project, Response::MODEL_PROJECT);
}
@@ -101,7 +101,6 @@ class Create extends Action
]);
$authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('number', $number);
@@ -95,7 +95,6 @@ class Delete extends Action
]);
$authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('number', $number);
@@ -97,7 +97,6 @@ class Update extends Action
]);
$authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('number', $number);
@@ -425,10 +425,7 @@ abstract class Base extends Action
'oAuthProviders' => $oAuthProviders
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
return $project;
return $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
}
public function action(
@@ -103,7 +103,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -75,7 +75,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -83,7 +83,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -76,7 +76,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -103,7 +103,6 @@ class Update extends Action
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), new Document([
'auths' => $auths,
])));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -75,7 +75,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -75,7 +75,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -75,7 +75,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -81,7 +81,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -81,7 +81,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents
->setParam('projectId', $project->getId())
@@ -79,7 +79,6 @@ class Update extends Action
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), new Document([
'apis' => $protocols,
])));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('protocolId', $protocolId);
@@ -170,7 +170,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$response->dynamic($project, Response::MODEL_PROJECT);
}
@@ -79,7 +79,6 @@ class Update extends Action
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), new Document([
'services' => $services,
])));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('serviceId', $serviceId);
@@ -129,7 +129,6 @@ class Update extends Action
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$queueForEvents->setParam('templateId', $templateId);