Types of Cacheable Data
This section describes the types of data that are cacheable, how and when the data is obtained, and the methods that participate in metadata caching.
Here is a list of the types of data that are cached in the cache manager:
*Table metadata, which includes table's column list, primary key, default values and identity constraint.
*Results of exists() and isView() calls.
*Foreign keys, and foreign keys in other tables that reference this table.
*Column constraints, including unique and check constraints.
*Stored procedure parameters, return value, text, and the results of the exists() call.
To simply use a cache manager, you do not need to know anything about the cache manager methods. The methods involved in metadata caching use the cache manager internally in the interest of efficiency. Here is what a method does when some operation requires data that is potentially cached:
*Checks the in-object variable (local cache) that holds the data, if there is one. Not all cacheable data has a local cache variable.
*If not found locally, checks the global cache. If found in the global cache, uses that data without querying the database, and sets the local cache variable if there is one.
*If not found in the global cache, queries the database, and then sets the data in the global cache and the local cache variable, if there is one.
For complete information on the metadata caching behavior of methods in RWDBTable and RWDBStoredProc, see these class entries in the SourcePro API Reference Guide.