Skip to content

origin_visits: Reuse cache entries if present

This clarifies the current code and optimizes the re-fetching of all origin visits / origin visit statuses when new visits happen. It's an optimization providing previous visits are in the cache already.

The second part serves also as a workaround of some problematic origins (the ones with a high number of visits). It's only a workaround though because when voiding the cache (e.g. restart the cache service), the initial error (e.g. crash 500 or 502, ...) will still happen.

Another change is on its way to try and fix that specific problem.

Related to swh/infra/sysadm-environment#3905 (closed) Depends on !712 (closed)

Test Plan

tox


Migrated from D7066 (view on Phabricator)

Merge request reports