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
Argument | Data Type | Description |
---|---|---|
datasourcename | String | Properly capitalized data source name to use for the background queries. |
tablename | String | Properly capitalized table name or view name. May specify a schema if needed. |
timestampcolumn | String | Column name that has the timestamps. This must be indexed or the cache will choke on large tables. |
whereclause | String | 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. |
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.