#346 Save or cache calls to `bodhi.get_active_branches()`
Opened by abompard. Modified

On staging (and probably prod but I didn't check) there's a ton on calls to /releases/?exclude_archived=True. I think it comes from toddlers. There are places here that can spare quite a few calls to bodhi.get_active_branches(), as they are done inside loops but will always return the same thing.
There's calls in clean_retired_packages, in distgit_bugzilla_sync and in koji_block_retired.

These calls could be done only once or/and cached with dogpile.


Maybe we can do the caching directly in bodhi module

Yeah that would be a possible improvement. We can easily cache this value for an hour, and the caching infrastructure is already in place (dogpile).

Metadata
Related Pull Requests