Discovered during testing of
MDL-67812 which adds a new repository.
We currently only have one cache for repositories, and it is defined as a per-request cache.
It stores several sets of prefixed data:
- instance records (from the repository and repository_instances tables (cache keys prefixed with i:)
- types by id (prefixed with types: or typesvis:)
- types by name (prefixed with typename:)
- all data (prefixed with all:)
- options (prefixed with ops:)
In almost all of these cases they can be moved to an application cache, and some probably don't need to be stored in cache at all.
This should save activerepos * 2 DB reads on any page which uses a file picker.