{"id":13858222,"url":"https://github.com/databio/simpleCache","last_synced_at":"2025-07-13T23:31:40.220Z","repository":{"id":22236801,"uuid":"25570023","full_name":"databio/simpleCache","owner":"databio","description":"Simplified R caching for reproducible big data projects","archived":false,"fork":false,"pushed_at":"2021-04-19T21:59:09.000Z","size":243,"stargazers_count":33,"open_issues_count":14,"forks_count":6,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-06-27T02:38:37.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://code.databio.org/simpleCache/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/databio.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-10-22T08:22:26.000Z","updated_at":"2025-03-22T11:15:06.000Z","dependencies_parsed_at":"2022-08-21T02:00:12.018Z","dependency_job_id":null,"html_url":"https://github.com/databio/simpleCache","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/databio/simpleCache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2FsimpleCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2FsimpleCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2FsimpleCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2FsimpleCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databio","download_url":"https://codeload.github.com/databio/simpleCache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2FsimpleCache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264184500,"owners_count":23569910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:02:00.917Z","updated_at":"2025-07-13T23:31:35.204Z","avatar_url":"https://github.com/databio.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"simpleCache: R caching for restartable analysis\n-----------------------------------------------\n\n\u003ca href=\"https://travis-ci.org/databio/simpleCache\"\u003e\u003cimg src=\"https://travis-ci.org/databio/simpleCache.svg?branch=master\" alt=\"Travis CI status\"\u003e\u003c/img\u003e\u003c/a\u003e\u003ca href=\"https://cran.r-project.org/package=simpleCache\"\u003e\u003cimg src=\"https://www.r-pkg.org/badges/version/simpleCache\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n`simpleCache` is an R package providing functions for caching R objects. Its\npurpose is to encourage writing reusable, restartable, and reproducible analysis\npipelines for projects with massive data and computational requirements.\n\nLike its name indicates, `simpleCache` is intended to be simple. You choose a\nlocation to store your caches, and then provide the function with nothing more\nthan a cache name and instructions (R code) for how to produce the R object.\nWhile simple, `simpleCache` also provides some advanced options like environment\nassignments, recreating caches, reloading caches, and even cluster compute\nbindings (using the `batchtools` package) making it flexible enough for use in\nlarge-scale data analysis projects.\n\n--------------------------------------------------------------------------------\n### Installing simpleCache\n\n`simpleCache` is on\n[CRAN](https://cran.r-project.org/package=simpleCache) and can\nbe installed as usual:\n\n```\ninstall.packages(\"simpleCache\")\n```\n\n--------------------------------------------------------------------------------\n### Running simpleCache\n\n`simpleCache` comes with a single primary function (`simpleCache()`) that will do almost\neverything you need. In short, you run it with a few lines like this:\n\n```\nlibrary(simpleCache) \nsetCacheDir(tempdir())\nsimpleCache(\"normSample\", { rnorm(1e7, 0,1) }, recreate=TRUE)\nsimpleCache(\"normSample\", { rnorm(1e7, 0,1) })\n```\n\n`simpleCache` also interfaces with the `batchtools` package to let you build\ncaches on any cluster resource manager.\n\n--------------------------------------------------------------------------------\n### Highlights of exported functions\n\n- `simpleCache()`: Creates and caches or reloads cached results of provided R instruction code\n- `listCaches()`: Lists all of the caches available in the `cacheDir`\n- `deleteCaches()`: Deletes cache(s) from the `cacheDir`\n- `setCacheDir()`: Sets a global option for a cache directory so you don't have to specify one in each `simpleCache` call\n- `simpleCacheOptions()`: Views all of the `simpleCache` global options that have been set\n\n### simpleCache Philosophy\n\nThe use case I had in mind for `simpleCache` is that you find yourself\nconstantly recalculating the same R object in several different scripts, or\nrepeatedly in the same script, every time you open it and want to continue that\nproject. SimpleCache is well-suited for interactive analysis, allowing you to\npick up right where you left off in a new R session, without having to\nrecalculate everything. It is equally useful in automatic pipelines, where\nseparate scripts may benefit from loading, instead of recalculating, the same R\nobjects produced by other scripts.\n\nR provides some base functions (`save`, `serialize`, and `load`) to let you save\nand reload such objects, but these low-level functions are a bit cumbersome.\n`simpleCache` simply provides a convenient, user-friendly interface to these\nfunctions, streamlining the process. For example, a single `simpleCache` call\nwill check for a cache and load it if it exists, or create it if it does not.\nWith the base R `save` and `load` functions, you can't just write a single\nfunction call and then run the same thing every time you start the script --\neven this simple use case requires additional logic to check for an existing\ncache. `simpleCache` just does all this for you.\n\nThe thing to keep in mind with `simpleCache` is that **the cache name is\nparamount**. `simpleCache` assumes that your name for an object is a perfect\nidentifier for that object; in other words, don't cache things that you plan to\nchange.\n\n### Contributing\n\n`simpleCache` is licensed under the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause). Questions, feature requests and bug reports are welcome via the [issue queue](https://github.com/databio/simpleCache/issues). The maintainer will review pull requests and incorporate contributions at his discretion.\n\nFor more information refer to the contributing document and pull request / issue templates in the [.github folder](https://github.com/databio/simpleCache/tree/master/.github) of this repository.\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabio%2FsimpleCache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabio%2FsimpleCache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabio%2FsimpleCache/lists"}