Identified as a hot path in production. Preload it early instead of
executing the queries in a live request.
The Badge model expires this cache each time a badge is updated.
The Group model expires this cache each time a group is updated.
Expiry of cache is done in discourse/014-track-setting-changes.rb at eb2c399445bf1007c9eb3c358003191ffcec0211 · discourse/discourse · GitHub
Test failure is unrelated
Thank you @vinothkannans