Try bypassing the cache for CSS classes when the pseuds are already loaded

Description

The code for generating the CSS classes for a work uses a cache, resulting in 20 separate memcached gets for all work index pages.

Once pseuds are loaded on all work indexes (), it might be faster to rewrite the css_classes_for_creation_blurb function to use pseuds.pluck(:user_id).uniq instead of users.pluck(:id).uniq, and bypass the cache when the pseuds are loaded (or just skip the cache altogether). Let's try it, preferably in a release without any other performance changes, so that it’s easier to check if it’s an improvement.

Testing Instructions

Mute a user who has some public works, and view their /users/NAME/works page to make sure that all the works are invisible.

Activity

Show:

Details

Assignee

Reporter

Roadmap

Works

Priority

Difficulty

Milestone

Sentry

Created February 21, 2023 at 7:30 PM
Updated 3 days ago