Cache more things
- Dominant language
- Clojure
- Stars
- 66
- Forks
- 28
- Avg merge
- 7d 4h
- Merged PRs (30d)
- 2
Description
We can reduce the amount of DB calls for our APIs. For example loading the Resources admin screen with 1K (perf test) resources causes roughly 3K DB calls (1 to load the 1000 resources, 1000 to enrich org for each, 1000 to enrich license to each, 1000 to enrich org of each license ...). This is not an immediate problem but a straightforward performance improvement is possible.
- [x] Consider caching resources, organizations, ... i.e. every major business item.
- [ ] Consider caching the enriched item (i.e. service level cache) with its dependencies.
- [ ] Decide and use one way for caching these business items. See also #2777
- [ ] When to invalidate? Using the dependencies namespace? Manually in admin functions is OK? Should invalidations happen in the background by a poller?
- [ ] An API for invalidating could be useful. A CLI command too?
- Would CLI commands use this API or do something in DB for the REMS server instance to invalidate?
- [ ] CLI commands should automatically update the caches so that REMS can be operated from another process or server using them without requiring a restart to refresh caches.
Contributor guide
Assessment
This issue has not been assessed yet.