storr (version 1.0.0)

storr_external: Storr that kooks for external resources

Description

storr for fetching external resources. This does not do a full cascade (that will be implemented elsewhere) but does a very simple pattern where if a key cannot be found in the storr we go out to some external source to find it.

Usage

storr_external(storage_driver, fetch_hook, default_namespace = "objects")

Arguments

storage_driver
Another storr driver to handle the actual storage.
fetch_hook
A function to run to fetch data when a key is not found in the store. This function must throw an error (of any type) if the external resource cannot be resolved.
default_namespace
Default namespace (see storr)