Currently, we cache almost the full wbcheckconstraints response (T181060). This means that we have to cache the response separately for each language, since it contains rendered messages in the user’s language. Instead, we should store some serialized form of the CheckResult objects, which should contain message objects, not rendered strings. We can then render the messages only after getting the response from the cache, so we can reuse the same cached results for all languages.
One additional benefit is that we don’t need to cache the NullResults which we generate (cf. T178160), which should also save a lot of space in the cached value (given that we expect the average entity to yield few actual results that we would cache).
This also means that we can store results from any request whose status parameter is a superset of the three “interesting” statuses violation|warning|parameter, and return cached results for any request whose status parameter is a subset of them, instead of requiring an exact match. (Currently, we require an exact match because removing CheckResult arrays from the response structure is difficult.)