red-datasets icon indicating copy to clipboard operation
red-datasets copied to clipboard

prefer XDG_CACHE_HOME before os specific cache directories

Open dsisnero opened this issue 2 years ago • 3 comments

I think the correct logic is to use XDG_CACHE_HOME if it is given and if not, use platform defaults

dsisnero avatar Jan 12 '23 23:01 dsisnero

Why? I think that macOS and Windows don't follow XDG.

If we want to change cache directory for Red Datasets, we should introduce our environment variable such as RED_DATASETS_CACHE_DIR or something.

kou avatar Jan 13 '23 08:01 kou

because, for windows, and, macos, if it is not set - normal mode, it will not be used. For windows, as an example, I have a work computer that doesn't have very much memory on the main hard drive so by setting this XDG_CACHE_HOME , I can have my config in the location I want. All my configs for every os are in the same location - under XDG_CACHE_HOME - can back this up easily on git

So - if it is not set, it will follow normal conventions but if it is set - can override to a location the user wants.

On Fri, Jan 13, 2023 at 1:04 AM Sutou Kouhei @.***> wrote:

Why? I think that macOS and Windows don't follow XDG.

If we want to change cache directory for Red Datasets, we should introduce our environment variable such as RED_DATASETS_CACHE_DIR or something.

— Reply to this email directly, view it on GitHub https://github.com/red-data-tools/red-datasets/pull/164#issuecomment-1381449440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABQRMQJDYODPOPRBRYSLTWSED7LANCNFSM6AAAAAATZZX4JE . You are receiving this because you authored the thread.Message ID: @.***>

dsisnero avatar Jan 14 '23 21:01 dsisnero

Do you know products that use XDG on Windows/macOS? If there are many products, we can follow it. Otherwise, we should introduce an environment variable only for us.

kou avatar Jan 15 '23 06:01 kou