Open igadmg opened 1 year ago
Hi @yatagarasu25
Thanks for your report. Could you please clarify which files are being re-downloaded?
For clarification the file download cache has 2 different confs:
conan config list | grep cache
core.cache:storage_path: Absolute path where the packages and database are stored
core.download:download_cache: Define path to a file download cache
tools.files.download:download_cache: Define the cache folder to store downloads from files.download()/get()
core.download:download_cache
: for caching the Conan internal files like conan_package.tgz
tools.files.download:download_cache
: for caching the external/third_party files downloaded by recipes in download()
or get()
calls.Is it possible that you are missing the second one?
Thanks, I completely missed tools.files.download:download_cache
It is sort of working now, yet still sometime files are cached sometimes they don't. Looks like that depends if sources are read form yaml or url is passed directly from coananfile.py
It is sort of working now, yet still sometime files are cached sometimes they don't. Looks like that depends if sources are read form yaml or url is passed directly from coananfile.py
The difference could be if the yaml provide md5/sha1 checksums or not. Only files that provide a checksum are cached in the fileDownloadCache
I think it would help if this feature was better documented. If ~
isn't going to be expanded, the documentation should say so and document how to use a cache configured in the user's home directory. Many users are probably going to want to put this somewhere in there home directory, like in ~/.cache
. I used the following in global.conf
to get this working in Conan 1.60.0.
core.download:download_cache = {{ os.path.join(os.path.expanduser('~'), ".cache", "conan", "download") }}
tools.files.download:download_cache = {{ os.path.join(os.path.expanduser('~'), ".cache", "conan", "download") }}
This has changed in Conan 2.0, that by default will use a download cache inside the Conan cache. We are testing the new features in ConanCenter, and hopefully it will be publicly launched in 2.0.6.
Environment details
have setup conan download cache in global.conf but it does not work
My setup core.cache:storage_path=f:/.conan core.download:download_cache=f:/.conan/.cache
but files are redownloaded every conan create rerun
Steps to reproduce
No response
Logs
No response