load_cache: Load a Cached Resultset from a SQL Query

Description Usage Arguments Details Value See Also

View source: R/cache.R

Description

Load a resultset from a "fantasia" cache directory with the SQL Statement as the key if it was previously cached or is within expiration period as indicated by the hrs_expired argument. This function is a wrapper around the loadCache function.

Usage

1
load_cache(sql_statement, hrs_expired = 8, dirs)

Arguments

sql_statement

SQL Statement from which a hexadecimal hash code was be generated and appended to the cache filename. See cache for more information.

dirs

Argument passed to findCache and loadCache

Details

An expiration period is incorporated by first determining the cache path and its mtime from the file information. If the cache file exists, the resultset will be returned if the the difference between the current time and the mtime of the cache file is less than or equal to the hrs_expired value.

Value

Resultset if the cached file exists and is not expired and NULL otherwise.

See Also

Other cache functions: cache(), loadCache()


patelm9/pg13 documentation built on Dec. 26, 2021, 8:17 p.m.