Update zoekt cache to use project id and group id in scope
What does this MR do and why?
Update zoekt cache to use project_id and group_id in scope instead of the deprecated list of project IDs.
AI Summary
This code change refactors how search caching works by simplifying the scope from handling multiple projects to handling either a single project or a single group.
The main changes are:
- Replaced
project_ids(which could handle multiple projects) with separateproject_idandgroup_idparameters that handle one at a time- Simplified the constructor to use a more flexible options pattern instead of listing all parameters individually
- Updated the cache validation logic so it's enabled when either a project ID or group ID is present (but not requiring both)
- Modified how the cache key is generated to use the new single project/group approach instead of sorting multiple project IDs
- Updated all the related tests to reflect these changes
This makes the caching system more straightforward by focusing on one scope at a time rather than trying to handle multiple projects simultaneously, while still supporting both project-level and group-level searches.
References
- Closes #557418 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by John Mason