mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 21:28:18 +00:00
feat: added cache invalidation for old secret rotation
This commit is contained in:
+3
-1
@@ -48,7 +48,7 @@ type TSecretRotationQueueFactoryDep = {
|
|||||||
secretRotationDAL: TSecretRotationDALFactory;
|
secretRotationDAL: TSecretRotationDALFactory;
|
||||||
projectBotService: Pick<TProjectBotServiceFactory, "getBotKey">;
|
projectBotService: Pick<TProjectBotServiceFactory, "getBotKey">;
|
||||||
secretDAL: Pick<TSecretDALFactory, "bulkUpdate" | "find">;
|
secretDAL: Pick<TSecretDALFactory, "bulkUpdate" | "find">;
|
||||||
secretV2BridgeDAL: Pick<TSecretV2BridgeDALFactory, "bulkUpdate" | "find">;
|
secretV2BridgeDAL: Pick<TSecretV2BridgeDALFactory, "bulkUpdate" | "find" | "cacheInvalidateSecretByProjectId">;
|
||||||
secretVersionDAL: Pick<TSecretVersionDALFactory, "insertMany" | "findLatestVersionMany">;
|
secretVersionDAL: Pick<TSecretVersionDALFactory, "insertMany" | "findLatestVersionMany">;
|
||||||
secretVersionV2BridgeDAL: Pick<TSecretVersionV2DALFactory, "insertMany" | "findLatestVersionMany">;
|
secretVersionV2BridgeDAL: Pick<TSecretVersionV2DALFactory, "insertMany" | "findLatestVersionMany">;
|
||||||
telemetryService: Pick<TTelemetryServiceFactory, "sendPostHogEvents">;
|
telemetryService: Pick<TTelemetryServiceFactory, "sendPostHogEvents">;
|
||||||
@@ -339,6 +339,8 @@ export const secretRotationQueueFactory = ({
|
|||||||
tx
|
tx
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await secretV2BridgeDAL.cacheInvalidateSecretByProjectId(secretRotation.projectId);
|
||||||
} else {
|
} else {
|
||||||
if (!botKey)
|
if (!botKey)
|
||||||
throw new NotFoundError({
|
throw new NotFoundError({
|
||||||
|
|||||||
Reference in New Issue
Block a user