-
Notifications
You must be signed in to change notification settings - Fork 990
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
New command/option for cache cleanup with customizable retention period #3587
Comments
What |
Maybe as an extra It could also be done via a separate tool, provided the required metadata can be accessed in a defined & stable way. |
I do not like the idea of having things done automatically either. Also that automatic thing would soon start to be customizable with all sorts of criteria: oudated, testing/debugging channels, recipes without packages.... And the |
I think this is a must-have when sharing the cache between multiple leaf packages. And sharing the cache is practically necessary when having a larger number of leaf packages and versions of them. Otherwise the space required is way too large. Cleaning the cache completely is not an option for performance reasons. Maybe I am mistaken w.r.t. to the existing -o option but as I understand it it does not serve the use case I described. However, there is no documentation of its behaviour at the moment. |
I agree we should document "outdated from recipe". Here is the issue conan-io/docs#478 |
It cannot be automatic, or implicit, it needs to be explicit and configurable by the users, probably in a flexible way. At the moment, there are no feature that allows to do a I wouldn't oppose to a If anyone is willing to contribute a proof of concept of this feature for the local cache, we could have a look, but at the moment, it is difficult to put it in our roadmap. |
Sorry, probably "automatic" was somewhat confusing. I will change the title to "configurable" instead.
I agree, that would be a good starting point.
Let's hope it can be kept simple.
I don't quite understand this point. What does the cleaning of the local cache have to do with the servers?
Ok, I will check if me or some colleague of mine can do this! |
The
Excellent, if finally going to give it a try, please try to keep it as "minimal" as possible, submit it as soon as possible to gather early feedback, instead of working for a long time. Many thanks! |
I would propose a different approach, more explicit on the user side: what if Conan just provides a list with all the packages in the local cache (and maybe accept a matching pattern like the In the future, this Other servers can implement this endpoint or not, an let the user know the full list of packages; but they more likely to do so than to provide a batch remove command with wildcards. |
Are there any nears plans to provide some conan cache cleanup options at all? Thank you.
|
Yes, Conan 2.0 has provided some infrastructure for storing the LRU date of packages, and that will be used for implementing such behavior. It is planned as a 2.X feature, that means, after stabilizing 2.0, will be in the backlog. |
Conan has finally implemented this in #14054, it has been merged it will be in next 2.0.14 release! |
Over time, the conan cache grows accumulating stale dependencies. There should be an automatic cleanup mechanism, which automatically removes packages in a customizable way based on some criteria:
For example, we are using testing and stable channels. Packages from testing channels are rebuilt at least daily, so packages older than a day will not normally be used again. Packages from stable channels might be used over months, but could also be removed when they have not been used for some days.
The text was updated successfully, but these errors were encountered: