Currently, there are two choices for garbage collection:
- Every publish.
- On manual trigger.
Every publish may be too often on large repositories – manual trigger may be difficult to schedule in, say, a cronjob as we do not know precisely when the repository will be unlocked.
We ought to have a third mode - "automatic infrequent". That is, when a publish is complete, run GC if the last GC was more than X hours ago. This way, we have a better mechanism to make sure we routinely garbage collect repositories that are published to via cron job.