The image suggestions service serves relatively static data. "Algorithm" data is expected to be generated on a monthly cadence. Even results from MediaSearch, which in theory can change at any time, are static enough in practice that a short-term cache could be useful.
Investigate options for adding caching to the service. Among the considerations:
- what results should be cached? (Algorithm only? MediaSearch only? Both? Full responses?)
- where should cached data live?
- what timeouts should we configure?
- does any existing piece of our infrastructure help?
- what impact does the current toolforge hosting vs. the eventual production k8s hosting have on caching?
- what impact does user feedback/edits have? What will we do about cache invalidation?