We're updating the issue view to help you get more done. 

Make updating filter counts asynchronous

Description

We currently update the filter_counts table (which caches tag uses) in real time when users create new works or edit their tags. These are slow requests, and the counts don't really need up-to-the-minute accuracy, so we should handle this asynchronously instead, ideally adding the tag ids to a set and running a scheduled task hourly or every n hours.

Testing

  1. Pick a medium and go to its page.

  2. Pick a canonical fandom in that medium.

  3. Write down the current count associated with that fandom.

  4. Create a new work in that fandom.

  5. Wait 1 hour.

  6. Check the medium's page again and verify that the count has increased by 1.

You can also do similar tests with other actions that should change the count: e.g. deleting a work, adding or removing a canonical tag from an existing work, wrangling a tag, etc.

Environment

Status

Assignee

ticking instant

Reporter

elzj78 (Elz)

Roadmap

Works

Priority

Medium

Affects versions

0.9.210

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9