PERF: Cache Category.subcategory_ids (PR #9350)

GitHub

I think we try to keep these types of things in config/initializers/014-track-setting-changes.rb, so that it’s easier to reason with.

Also, do we need to clear the cache in any other situations? E.g. restoring a backup?