User Guide > TDV Caching > Overview of TDV Caching > TDV-Created Caching Objects
 
TDV-Created Caching Objects
This section provides an overview of some of the key objects created to facilitate TDV caching. Depending on how you set up your cache, the following objects are created either by TDV or by you. If you decide to use the automatic storage type selection, the names of the objects are set by TDV. If you choose any of the other options you can name the tables anything you want. TDV suggests using names that are easy for you to identify as cache data, cache tracking, and cache status.
Cache Status
The status table (or file) is used to track which views and procedures currently have cached data stored, when they were last refreshed, and so on.
Each Studio data source used as a caching target must have its own status table.
Cache Tracking
The tracking table (or file) is used to track the tables, views, and procedures that are using a particular cache target. It is also used to track what tables in the cache target are in use.
Each Studio data source used as a caching target must have its own tracking table.
Cache Data
The name of the object you want to store cached data for is appended with cache. These are the file or database tables that will hold the cached data. Resources cannot share the same data cache.
The cachekey Column
The cachekey column is a way to uniquely identify a particular snapshot of cached data. TDV uses it to determine what data in the cache to return for a query request from an application, to determine cache versioning, transaction integrity, and when old cache records are ready to be cleared out. If you decide to use some of the more advanced caching options, you can use the cache key in your custom scripts to drive caching actions such as syncing cache data to a cache copy on request.
The cache data table, for most caching options, has a cachekey column that contains a unique integer identifier. The cache status table identifies the cachekey value that is associated with current data or with specific parameter input variants for procedures.
The cache key is a unique number generated for each cached result set. For most caching configurations, it is the only caching table column automatically generated by the TDV Server.
Because the cache key is a unique integer for each snapshot of data, it can be useful for indexing, when defining pre- and post-refresh action scripts, or when defining scripts for incremental caching. Because the cache key is used often to filter data, it should be the first column of the index when indexing the cache table.
For multi-table caching, the cachekey column is not in the target table, but it is in the cache status table to support leader election, garbage collection, cluster communication, and for consistent cache status.
 
The cache metadata tables contain some abbreviated values. For example:
Metadata Values
Meaning
Description
A
active
Cache is loaded.
I
in progress
Cache is currently refreshing.
F
failed
The loading of the cache failed for some reason.
C
cleared
Cache has been cleared.
K
key
A special value used to indicate the key row in the table.