PERF: Cache categories in Site model take 3. (PR #13470)

Follow-up to 83a6ad32ffe75ae222028feddeca169fc5be54ac

GitHub

Per process in memory cache instead of distributed cache because we don’t want to be marshalling a ton of ActiveRecord objects and sending them flying through Redis.

I’m not sure this is safe, because it means we’ll be using the same active record objects in multiple threads.

Oh, and it looks like this won’t work with multisite.

Hmm good point. This is starting to become tricky… I think I need to stop caching AR objects and revert it back to caching the serialized objects.