Skip to content

jbryer/DataCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataCache: R Package for Managing Data Caches

Build Status CRAN_Status_Badge

The latest development version can be installed using the devtools package:

devtools::install_github('jbryer/DataCache')

Example

This example will load weather data.

library('weatherData')
library('DataCache')

loadWeatherData <- function(station_id='ALB') {
	return(list(weather=getDetailedWeather(station_id, Sys.Date())))
}

cacheData(loadWeatherData)
cache.info()
cache.info(stale=c('2mins'=nMinutes(2)))

Wait two minutes so the cache becomes stale.

Sys.sleep(120)
cacheData(loadWeatherData, nMinutes(2))

About

Package to maintain a data cache.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages