You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
ICache will eventually replace the existing cache access functions on FDerivedDataCacheInterface. The notable differences relative to the existing interface are: - It is asynchronous with completion callbacks by default, and allows waiting when necessary. - It allows batch requests containing multiple cache records by default. - It uses a structured cache key made up of a bucket name and a hash. - It supports prioritization and cancellation of requests. - It supports structured cache records with metadata. - It supports attachments to allow multi-part cache records. - It uses a typed request object instead of an opaque integer handle. - It provides cache policy flags to control how to query and store cache records, and which parts of a cache record to fetch. This initial implementation of ICache is totally synchronous and uses the existing cache backends for storage. #rb Zousar.Shaker [CL 15152247 by Devin Doucette in ue5-main branch]
47 lines
945 B
C++
47 lines
945 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "DerivedDataCacheRecord.h"
|
|
|
|
namespace UE
|
|
{
|
|
namespace DerivedData
|
|
{
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
FCacheRecord::FCacheRecord() = default;
|
|
|
|
void FCacheRecord::Reset()
|
|
{
|
|
*this = FCacheRecord();
|
|
}
|
|
|
|
void FCacheRecord::SetBinary(FSharedBuffer Value)
|
|
{
|
|
Object.Reset();
|
|
Package.Reset();
|
|
Binary = MoveTemp(Value);
|
|
Type = ECacheRecordType::Binary;
|
|
}
|
|
|
|
void FCacheRecord::SetObject(FCbObjectRef Value)
|
|
{
|
|
Binary.Reset();
|
|
Package.Reset();
|
|
Object = MoveTemp(Value);
|
|
Type = ECacheRecordType::Object;
|
|
}
|
|
|
|
void FCacheRecord::SetPackage(FCbPackage Value)
|
|
{
|
|
Binary.Reset();
|
|
Object.Reset();
|
|
Package = MoveTemp(Value);
|
|
Type = ECacheRecordType::Package;
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
} // DerivedData
|
|
} // UE
|