SPIKE: Cache group domains on Pages Internal API
Problem
Cache group domains, the cache key would be just a group domain name, and we would invalidate it on:
- any project path changes within a group (adding new projects, removing them, archiving, moving, renaming, creating/removing/renaming subgroups...).
- any deployment event.
We actually used to do that before we introduced the new architecture. We stored pages on disk using project path, and every time that path was changing we moved directory on disk
We can try to restore some fo this code. See &1316 (closed), &4851 (closed), e.g !53363 (diffs),
We had class called Gitlab::PagesTransfer, so we can take a year or two old code, see where this class(+deploy/remove pages workers) were used, and invalidate cache in these places.
But this is would not be super easy. I would also:
- guard this with feature flags
- use https://docs.gitlab.com/ee/development/event_store.html instead of injecting code directly into related services.
Based on: #357199 (comment 912199225)
Edited by Kassio Borges