Skip to content

Consider memoisation or some kind of caching mechanism? #29

@njtierney

Description

@njtierney

Just to make sure we don't need to download the data each and every time.

One approach is to consider memoisation to manage the downloads of files so we don't download each time

Another approach to this could be to save it in the pkg user directory:

get_pkg_user_dir <- function() {
  pkg_user_dir <- tools::R_user_dir("ozroaddeaths")
  if (!dir.exists(pkg_user_dir)) {
    dir.create(pkg_user_dir, recursive = TRUE)
  }
  pkg_user_dir
}

and then do some sort of cache invalidation magic to check if the data needs to be updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions