2.2.5.2.10 Cache Records
Cache records represent a snapshot of the source data (section 2.2.5.2.1) of a PivotCache (section 2.2.5.2) and allow for PivotTable views (section 2.2.5.3) using a PivotCache to be recalculated without retrieving the source data.
Cache records are specified by the PivotCache Records (section 2.1.7.39) part, which contains sequences of records that conform to the PIVOTCACHERECORD rule (defined in section 2.1.7.39). Each PIVOTCACHERECORD rule specifies one cache record (section 2.2.5.2.10) and corresponds to one row in the source data. The PIVOTCACHERECORD rules each specify a sequence of values. Each of these values MUST correspond to a different cache field (section 2.2.5.2.2) as defined by the PivotCache Definition (section 2.1.7.38) part ABNF. The order of the values, corresponding to different cache fields, in each PIVOTCACHERECORD rule MUST be the same as the order of the cache fields in the collection of cache fields specified by the BrtBeginPCDFields (section 2.4.137) collection. The number of values, corresponding to different cache fields, in each PIVOTCACHERECORD rule MUST be equal to the number of BrtBeginPCDField (section 2.4.136) records, for which the fSrcField field is equal to 1, in the BrtBeginPCDFields collection.
If a pivot field (section 2.2.5.3.2) associated with a cache field (section 2.2.5.2.2) exists in the PivotTable view (section 2.2.5.3), the cache field MUST have associated cache items; if not, associated cache items (section 2.2.5.2.3) are optional.
For cache fields that have cache items, the cache items of the cache fields are referenced by an index. For sequences of records that conform to the PIVOTCACHERECORDDT (defined in section 2.1.7.39), the index is specified by the BrtPCDIIndex (section 2.4.730) record. For BrtPCRRecord (section 2.4.735) records, the index is stored in the rgb field of the BrtPCRRecord record.
For cache fields (section 2.2.5.2.2) that do not have cache items (section 2.2.5.2.3), the sequence of records that conform to a PCDIDT (defined in section 2.1.7.39) in a PIVOTCACHERECORD (defined in section 2.1.7.39) specify individual values of the corresponding source data (section 2.2.5.2.1) row. For BrtPCRRecord (section 2.4.735) records, the values of the corresponding source data row are stored in the rgb field of the BrtPCRRecord record.
An OLAP PivotCache (section 2.2.5.2) MUST NOT have cache records (section 2.2.5.2.10). Cache records are optional for a non-OLAP PivotCache.