Skip to content

Use user-specified custom cache directory #10244

Closed

Description

@pllim

As @bsipocz asked in #5828 (comment), "I run into this again today, and it seems we can change the config dir, but not the cache dir? If I misunderstand the situation, then we probably need to add more examples to the config dir, one especially for the case of the custom cache dir."

There is an option to change cache directory but has to be via XDG_CACHE_HOME. However, on Linux, changing it affects system-wide setting.

Maybe @bsipocz can clarify if this is a matter of documentation of improving https://docs.astropy.org/en/latest/config/index.html#astropy-config and/or https://docs.astropy.org/en/latest/utils/data.html . Or XDG_CACHE_HOME is simply insufficient.

Might also be relevant:

Previous unmerged attempts:

Activity

  1. changed the title [-]Use user-specified cache directory[/-] [+]Use user-specified custom cache directory[/+] on Apr 30, 2020
  2. bsipocz commented on Sep 10, 2025

    @bsipocz
    Member

    Hmm, I run into this again when I was trying to find the docs to show how to config the cache to be at a user specified location. Apparently it's still not possible?

  3. bsipocz commented on Sep 10, 2025

    @bsipocz
    Member

    Use case: this would be extremely useful in systems where one has a limited home directory space but works with big datasets (either HPC type systems, or in my case a cloud based project like NASA's Fornax) --> right now what we can recommend to them is to use cache=False, and that is not great.

    I would recommend this to be put on the list of the long standing feature requests that are unlikely to be picked up by volunteers, but that have widespread impact for user experience of data providers.

  4. pllim commented on Sep 10, 2025

    @pllim
    MemberAuthor

    Wow I totally forgot about this and opened #17507 which is probably duplicate.

  5. bsipocz commented on Sep 10, 2025

    @bsipocz
    Member

    Wow I totally forgot about this and opened #17507 which is probably duplicate.

    And so many others, too, from here but also from across of astroquery. Thanks for adding the xrefs into the OP above :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions