The repository nexus checks two things in the `wait` state: queued jobs
and cache usage, in that order. However, since polling jobs is
resource-intensive, it won't poll if no job has been triggered for the
repository in the past 6 hours. This can lead to the cache usage check
being skipped, preventing the cleanup of expired caches after 7 days if
no job has been triggered in that 6-hour window. Therefore, to ensure we
can clean up expired caches, the cache usage check should be prioritized
as the first step in the `wait` state.