-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaning package cache based on access time #60
Comments
If you implement this option you can consider the auto refresh option after that. ;) |
What do you mean by "auto refresh option"? |
If I had to make a guess, I'm guessing they want an option for flexo to automatically download package updates every configurable amount of time (without installing them) |
I thought about that, and decided to not implement this for different reasons. One reason is that this would cause unnecessary traffic on the mirrors because some packages are updated much more often than they are installed. For example, if a package is updated from version 1 to 2 and then 3, Flexo might download all three versions, but pacman might upgrade from 1 to 3 without ever downloading version 2. This is wasteful and something that I want to avoid, especially since the mirrors are provided by volunteers. |
Flexo already provides the possibility to automatically clean the package cache by retaining not more than x versions. However, it can still happen that a package is downloaded once by a client, and then uninstalled by the client, so that the package now remains in the cache indefinitely even though no client needs it anymore.
paccache
provides the-u, --uninstalled
flag for this use case, but we cannot provide something similar for Flexo, because Flexo runs on a server, so it doesn't know which packages are installed by the various clients that are using Flexo.As a workaround, we should give the user the possibility to define something like the following in the configuration file:
retain_for_duration = "9 months"
So that Flexo will remove all packages older than the given duration, even if that means that fewer than
num_versions_retain
versions are retained in the cache.We are already using the humantime library to parse human-readable durations, so implementing this should be easy.
If this option is not defined in the configuration file, the default should be to not delete any packages based on the access time.
The text was updated successfully, but these errors were encountered: