2.2.5.3.12 Cache Records

Cache records, as defined by the Pivot Cache Storage (section 2.1.7.12), represent a copy of the source data (section 2.2.5.3.2) for a PivotCache (section 2.2.5.3) and allow for PivotTable views (section 2.2.5.4) using a PivotCache to be recalculated without retrieving the source data.

Each cache record specifies values for one row of source data. Each value in a cache record is associated with a corresponding cache field (section 2.2.5.3.5). Cache records are specified by the sequence of records that conform to the DBB rule (section 2.1.7.12). The count of cache records MUST be equal to the crdbdb field of the SXDB record (section 2.4.275). The SXDBB record (section 2.4.276) specifies an array of cache item (section 2.2.5.3.6) indexes for the cache fields for which the fAllAtoms field of the SXFDB record (section 2.4.283) is equal to 1. The values for the remaining cache fields that correspond to source data columns are specified by the sequence of records that conform to the SXOPER rule (section 2.1.7.12), with each record specifying a value. For each cache record, the number of records in the sequence of records that conforms to the SXOPER rule (section 2.1.7.12) MUST be the same as the count of cache fields, corresponding to source data columns, for which the fAllAtoms field of the SXFDB record is equal to 0.

The cache records in a PivotCache can be invalid, in which case the cache records MUST be ignored. The validity of the cache records is determined from the SXAddl_SXCCache_SXDInvRefreshReal record (section 2.4.273.8), if one is present and associated with this PivotCache, the QsiSXTag record (section 2.4.211), if one is present and associated with this PivotCache, and the SXDB record. If the SXAddl_SXCCache_SXDInvRefreshReal record is present, then the cache records are not valid if the fInvalid field of the SXAddl_SXCCache_SXDInvRefreshReal record is 1 and valid if that field is 0. Otherwise, if the QsiSXTag record is present, then the cache records are not valid if the fInvalid field of the QsiSXTag record is 1 and valid if that field is 0. Otherwise, the cache records are not valid if the fInvalid field of the SXDB record is 1 and valid if that field is 0.

An OLAP PivotCache (section 2.2.5.3.4) MUST NOT have cache records. Cache records are optional for a non- OLAP PivotCache.