diff --git a/project/src/controllers/BotController.ts b/project/src/controllers/BotController.ts index 90b8ce6c..42f740d0 100644 --- a/project/src/controllers/BotController.ts +++ b/project/src/controllers/BotController.ts @@ -294,7 +294,9 @@ export class BotController } // Construct cache key - const cacheKey = `${botGenerationDetails.role}${botGenerationDetails.botDifficulty}`; + const cacheKey = `${ + botGenerationDetails.eventRole ?? botGenerationDetails.role + }${botGenerationDetails.botDifficulty}`; // Check cache for bot using above key if (!this.botGenerationCacheService.cacheHasBotOfRole(cacheKey))