I added a draft commit for testing the serializer output here so we don’t fly blind:
https://github.com/discourse/discourse/pull/10175/commits/791a1cfa1822096e9d870f1373c91ad143c0c2d9
After that, I tried re-applying what I did here but turns out I was adding an extra clause that was making it fast but incorrect.
The fact that we pass all this (even the most liked/ liked by) through the guardian means the info is always very correct and tailored to the viewer, but makes caching it not helping against multiple users.
I guess we can at least add a longer cache to this endpoint? In my opinion a 1 hour cache would be adequate, as the information in the summary doesn’t change often.