Amanda Alves Branquinho

Results 3 issues of Amanda Alves Branquinho

- This PR aims to fix a N+1 issue found in Theme model causing some performance problems. To prevent it, we are now including javascript_cache and upload relationships.

- This PR adds an extra outlet wrapper to replace the topic category.

Move the update merged [in this PR](https://github.com/discourse/discourse/pull/28585) to stable.