Invalidate gitlab-pages internal api cache with 'Application settings updated' event
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), needs to be invalidated in some application events (&7920 (closed)).
What is this issue
This issue is introduce the cache invalidation for the Application settings updated event.
Use the application settings as part of the cache key, something like:
def cache_key
settings = sha(ApplicationSetting.attributes.values_at(:force_access_control).join)
"pages_domain_for_#{type}_#{id}_v#{settings}" # type might be "project" or "namespace"
end