Skip to content

Refactor idea: the fetch call chain is too complex #200

Closed
@dshemetov

Description

@dshemetov

Reading through fetch, the callflow is:

  • fetch
  • cache_epidata_call
  • either fetch_tbl or fetch_classic
    • fetch_tbl checks if the method only supports classic and errors out, but then confusingly proceeds to call fetch_classic anyway
    • fetch_classic makes a request

My preference would be:

  • absorb the fetch_tbl and fetch_classic logic into a unified imperative fetch
  • pull the actual fetching part out of cache_epidata_call and only do the is_cacheable checking and storing there after the fetch has gone through

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions