SIMBAD cache question · Issue #3530 · astropy/astroquery · GitHub
Skip to content

SIMBAD cache question #3530

Open
Open

Description

@keflavich

@ManonMarchand in #2954, the caching machinery was removed in favor of lru_cache. My understanding is that this cache does not persist between sessions, it's purely in-memory, which is quite different from the previous mode.

Did you give any thought to a means for session-to-session caching as we had previously? This was my main use case. I discovered today that I'm unintentionally spamming SIMBAD with massive numbers of repeat requests because I thought I was using cached queries but was not.

@bsipocz do you have any feedback on this? The caching system was the source of some user problems in the past, but it was incredibly useful.

Activity

  1. bsipocz commented on Feb 12, 2026

    @bsipocz
    Member

    As I recall none of the pyvo dependent modules have any meaningful cache as pyvo doesn't really have it.

    Would it be useful to have something similar to the previous system? Probably; but I suppose it's a non-trivial amount of work to make it work well (while I'm not sure if we fully addressed vectorization issues).

  2. keflavich commented on Feb 12, 2026

    @keflavich
    ContributorAuthor

    Thanks. The 'lots of work' problem is legit, and I think it's quite reasonable to expect users to make one-off caches for specific use cases - it's not that hard. I may be the only one who was relying on the 'hidden' caching system.

  3. bsipocz commented on Feb 12, 2026

    @bsipocz
    Member

    The issue is that we never really resolved the cache invalidation problem and that hidden directory more often than not got out of hand causing problems especially on systems where one has a very limited amount of storage space.

  4. ManonMarchand commented on Feb 13, 2026

    @ManonMarchand
    Member

    Yes, the reason was that the cache system does not exist for classes which only depend on BaseVOQuery . We'd actually really like it if it could work as it would reduce the load on our servers. I started thinking about it but never got the time to actually implement it.

    The requirements I had in mind were:

    • the stored results would have to be votable and not pickles (for security reasons). This should work for all VO services except the ones returning images (? I think so ?)
    • the expiration time should be set by the users (SIMBAD is updated every working day so some people actually rely on having relatively fresh results)
    • the cache directory should be emptied regularly

    PS: I removed the simbad tag as this is actually the case for every sub module based on a VO API

  5. added
    queryastroquery internals
    and removed on Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions