Skip to content

Commit

Permalink
Fix cache clearing in ExperimentService
Browse files Browse the repository at this point in the history
  • Loading branch information
RidhamShah committed Nov 22, 2023
1 parent ca6c777 commit b51fc66
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1710,10 +1710,11 @@ export class ExperimentService {
return newDoc;
}

private async clearCacheDetails(experiment: Experiment | ExperimentDTO) {
private async clearCacheDetails(experiment: Experiment | ExperimentDTO): Promise<void> {
await this.cacheService.delCache(CACHE_PREFIX.EXPERIMENT_KEY_PREFIX + experiment.context[0]);
experiment.partitions.map(async (partition) => {
const deletedCache = experiment.partitions.map(async (partition) => {
await this.cacheService.delCache(CACHE_PREFIX.MARK_KEY_PREFIX + partition.site + ' ' + partition.target);
});
await Promise.all(deletedCache);
}
}

0 comments on commit b51fc66

Please sign in to comment.