Document all `download_cache`'s properly
I would like to cache downloads of sources.
I look into documentation documentation and see that it mentions core.download:download_cache configuration and describes it as
Define path to a file download cache
Are sources files? Yep. This must be a right fit. And it's not because this conf controls path to a cache of internal files. It would be great to mention that in docs.
Then we have tools.files.download:download_cache configuration and the documentation says that it's a conf for
caching the external/third_party files downloaded by recipes in download() or get() calls.
So I set it and get an error from conan
ERROR: Unknown conf 'tools.files.download:download_cache'.
And... This conf doesn't exist. It turns out that this conf was deleted. Changelogs doesn't mention that fact at all. This conf was replaced (as far as I understand) by core.sources:download_cache which is not documented at all.
Summing up
-
core.download:download_cacheconf documentation should say that it's for internal files -
tools.files.download:download_cacheconf documentation should be removed -
core.sources:download_cacheconf should be documented
Thanks for the report @maksim-petukhov
Indeed, the tools.files.download:download_cache was removed as buggy in latest 2.0.X.
And we have developed a new (very desired) feature, which is a backup of sources, that can store the cached files in a remote server and reuse them later.
This is expected not to be documented at the moment, as we are first implementing this ourselves in ConanCenter, to polish it and make sure everything is ok, and only after that we will documented it for public usage.
(We will remove the trailing tools.files.download:download_cache from the docs asap)
Please use the output of conan config list as the ground truth, and wait a bit until this is publicly documented and released. Many thanks!
Hi @memsharded,
Has the dust settled around core.sources:download_cache and has it or will it be documented as a fully supported feature?
Thanks!
Ok this clarifies tools.files.download:download_cache.
core.sources:download_cache is also clear.
But what is core.download:download_cache for? conan config list says: "Define path to a file download cache". Too short.
But what is core.download:download_cache for?
@patrick-fromberg sorry for the delay, you're right that we might want to update its description.
This conf is used to cache the conan_package.tgz and related files of a Conan package, so that in the event that the package is re-downloaded, the files are fetched from this cache before checking the remote Conan repository.
So its contents is mostly an implementation detail (as you don't usually deal with the raw package files Conan downloads), but the path lets you specify where they are stored.
Let me know if this helps :)