Navigation
API > API/Developer > API/Developer/DerivedDataCache
A cache record is a key, an array of values, and metadata.
The key must uniquely correspond to its values. The key must never be reused for other values. The metadata does not have this requirement and may be used to persist details that vary, such as the time to generate the values or the machine that generated them.
| Name | FCacheRecord |
| Type | class |
| Header File | /Engine/Source/Developer/DerivedDataCache/Public/DerivedDataCacheRecord.h |
| Include Path | #include "DerivedDataCacheRecord.h" |
Syntax
class FCacheRecord
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCacheRecord
(
Private::ICacheRecordInternal* InRecord |
Construct a cache record. | DerivedDataCacheRecord.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Record | TRefCountPtr< Private::ICacheRecordInternal > | DerivedDataCacheRecord.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FCacheKey & GetKey() |
Returns the key that identifies this record in the cache. | DerivedDataCacheRecord.h | |
const FCbObject & GetMeta () |
Returns the metadata. | DerivedDataCacheRecord.h | |
const FValueWithId & GetValue
(
const FValueId& Id |
Returns the value matching the ID. Null if no match. Data is null if skipped. | DerivedDataCacheRecord.h | |
TConstArrayView< FValueWithId > GetValues() |
Returns a view of the values ordered by ID. Data is null if skipped. | DerivedDataCacheRecord.h | |
FCbPackage Save () |
Save the cache record to a compact binary package. | DerivedDataCacheRecord.h | |
void Save
(
FCbPackage& Attachments, |
Append the cache record to an existing package and writer for e.g. a batch of records. | DerivedDataCacheRecord.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FOptionalCacheRecord Load
(
const FCbPackage& Package |
Load a cache record from a compact binary package. Null on error. | DerivedDataCacheRecord.h | |
static FOptionalCacheRecord Load
(
const FCbPackage& Attachments, |
DerivedDataCacheRecord.h |