Time Series Database Cache Module by Automation Professionals
E-Mail Support


Specify a table or view containing time series data that is to be cached. Optionally include a WHERE clause to limit the data in the specific cache. Returns a numeric handle for use with system.db.getSeriesCache().


system.db.registerSeriesCache(datasourcename, tablename, timestampcolumn, whereclause) returns Long

ArgumentData TypeDescription
datasourcenameStringProperly capitalized data source name to use for the background queries.
tablenameStringProperly capitalized table name or view name. May specify a schema if needed.
timestampcolumnStringColumn name that has the timestamps. This must be indexed or the cache will choke on large tables.

Optional WHERE clause to single out specific rows when multiple units are stored together in one table. Provide an empty string if not needed.

Different WHERE clauses are cached separately. Consistent case, whitespace, and internal quoting are significant.

Usage Notes

This function performs a lookup in the cache engine for a given data source/table/where clause combination, creating the underlying cache if necessary. The returned handle will expire if unused for five minutes.

Actual data retrieval is performed by the getSeriesCache() function.

See the timeSeriesCache expression function for a description of the underlying cache behavior.