Invalidate Pages API cache with Projects::ProjectFeaturesChangedEvent
What does this MR do and why?
Context
For GET /api/internal/pages?host=HOST. This is the API endpoint that gets called by GitLab pages when a request comes in and we haven't cached in gitlab-pages what needs to be served for this.
Given that the satisfiedThreshold for writing headers for a response is 0.5s, ideally, this would be even faster than the threshold set for web-pages. We think 0.5s for serving a static page is an acceptable target.
Since this information generally does not change a lot, we could add a cache for the JSON response of this endpoint to help the metrics. The cache introduced in #363867 (closed) (behind a feature flag), needs to be invalidated in some application events (&7920 (closed)).
This MR
This MR invalidates this cache with the Projects::ProjectFeaturesChangedEvent
introduced in !100608 (merged).
Related to: #376298 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.