Skip to content

astroquery cache should fall back to expired cache if remote fails #2909

@aripollak

Description

@aripollak

Some API backends (like MPC) have extended downtimes, and there is currently not easy way to tell astroquery (post-0.4.6 / #1634) to fall back to an existing expired cached response if the request raises an exception, while still respecting the regular cache expiration for successful requests.
In requests-cache, the equivalent setting would be stale_if_error=True. Maybe switching to requests-cache would be a good improvement, since it would allow deep customization of caching behavior, like an offline mode with only_if_cached=True.

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