Refactor recommendation page cache handling and configuration
continuous-integration/drone/push Build is passing

- Removed the `RecommendationPageCacheLanguages` configuration from `AISummarizerConfig` to streamline cache management.
- Updated the `companyService` and `tenderService` to utilize the new `InvalidateRecommendedTendersPageCache` method for cache invalidation, enhancing clarity and efficiency.
- Refactored the `invalidateRecommendedTendersPageCache` method to eliminate unnecessary context parameters, simplifying the function signature.
- Improved the handling of page cache refresh logic by consolidating language handling within the `tenderService`, ensuring consistent behavior across services.
- Cleaned up related tests and removed deprecated functions to maintain code quality and readability.

This update enhances the maintainability of the recommendation caching system by simplifying configuration and improving cache invalidation logic.
This commit is contained in:
Mazyar
2026-07-08 02:20:16 +03:30
parent 0b74e9ad23
commit 784c3d6563
11 changed files with 32 additions and 134 deletions
+2 -2
View File
@@ -467,7 +467,7 @@ func (s *companyService) cacheAIRecommendations(ctx context.Context, companyID s
return
}
s.invalidateRecommendedTendersPageCache(ctx, companyID)
s.invalidateRecommendedTendersPageCache(companyID)
s.scheduleRecommendedTendersPageCacheRefresh(companyID)
}
@@ -489,7 +489,7 @@ func (s *companyService) invalidateAIRecommendationCache(ctx context.Context, co
"error": err.Error(),
})
}
s.invalidateRecommendedTendersPageCache(ctx, companyID)
s.invalidateRecommendedTendersPageCache(companyID)
}
func (s *companyService) buildOnboardingDocuments(fileIDs []string) (string, error) {