storr v1.1.2

0

Monthly downloads

0th

Percentile

Simple Key Value Stores

Creates and manages simple key-value stores. These can use a variety of approaches for storing the data. This package implements the base methods and support for file system, in-memory and DBI-based database stores.

Readme

storr

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Build Status codecov.io

Simple object cacher for R. storr acts as a very simple key-value store (supporting get/set/del for arbitrary R objects as data). The actual storage can be transient or persistent, local or distributed without changing the interface. To allow for distributed access, data is returned by content rather than simply by key (with a key/content lookup step) so that if another process changes the data, storr will retrieve the current version.

  • Cached in-memory copies that might be faster to retrieve than on-disk/database copies
  • Content-addressable storage, storing and retrieving potentially fewer copies of identical data (useful if lookup is slow or over a network) and to make the system somewhat robust in the face of multiple accessing processes
  • Fetch from an external source (e.g. website) if a key is not found locally
  • Pluggable storage backends - currently

storr always goes back to the common storage (database, filesystem, whatever) for the current object to hash mapping, ensuring consistency when using multiple processes. However, when retrieving or writing the data given a hash we can often avoid accessing the underlying storage. This means that repeated lookups happen quickly while still being able to reflect changes elsewhere; time savings can be substantial where large objects are being stored.

Installation

From CRAN

install.packages("storr")

or install the development version with

remotes::install_github("richfitz/storr@develop", upgrade = FALSE)

Documentation

storr comes with two vignettes:

  • storr vignette("storr") outlines basic use and core implementation details.
  • external vignette("external") shows how to use storr to cache external resources such as files, web resources, etc, using the storr_external object.

Functions in storr

Name Description
encode64 Base64 encoding and decoding
fetch_hook_read Hook to fetch a resource from a file.
join_key_namespace Recycle key and namespace
driver_redis_api Defunct functions
storr Object cache
storr_dbi DBI storr driver
storr_rds rds object cache driver
test_driver Test a storr driver
storr_environment Environment object cache driver
storr_external Storr that kooks for external resources
No Results!

Vignettes of storr

Name
src/drivers.R
src/external.R
src/storr.R
external.Rmd
storr.Rmd
No Results!

Last month downloads

Details

License MIT + file LICENSE
LazyData true
URL https://github.com/richfitz/storr
BugReports https://github.com/richfitz/storr/issues
VignetteBuilder knitr
RoxygenNote 6.0.1
NeedsCompilation no
Packaged 2017-09-08 07:32:10 UTC; rich
Repository CRAN
Date/Publication 2017-09-08 14:56:24 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/storr)](http://www.rdocumentation.org/packages/storr)