omni icon indicating copy to clipboard operation
omni copied to clipboard

Feature: `omni tidy` should clean the cache

Open xaf opened this issue 2 years ago • 0 comments

If a repository is simply deleted without calling omni down, its cached information are kept. If omni up is ran in a random repository, leading to the use of .omni/id, its cached information are kept after deletion too.

We want to be able to clean the cache, and of course remove all the installed tools that are not necessary anymore. Since calling omni tidy already lists all the repositories, we would need to:

  • add support for handling .omni/id directories when using omni tidy
  • store a last up information for all workdir ids
  • make the inventory of all repository ids seen when using omni tidy
  • compare that inventory with the cached repository ids
  • automatically remove from the cache all ids for which the last up information is older than N (could default to something between 30 and 90 days, and provide a configuration parameter)

This would be a safe approach since not too invasive thanks to the grace period before deletion.

xaf avatar Aug 04 '23 05:08 xaf