You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The cache stores can individually control their "legacy mode" now, which offers a choice of ValueOnly, ValueWithLegacyFallback, LegacyOnly. - Using ValueOnly will forward every legacy request through the Value API, which compresses values by default and supports values larger than 2 GiB. - Using ValueWithLegacyFallback behaves like ValueOnly, but misses from GetValue are forwarded to GetCachedData, and stored with PutValue if found. - Using LegacyOnly will forward every legacy request through the Legacy API. FLegacyCacheValue uses shared state to ensure that each value is compressed or decompressed at most once. #jira UE-134381 #preflight 62054b430c64e1822f41231b #lockdown Mark.Lintott #rb Zousar.Shaker #rnx #ROBOMERGE-AUTHOR: devin.doucette #ROBOMERGE-SOURCE: CL 18940270 in //UE5/Release-5.0/... via CL 18941016 via CL 18941392 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589) [CL 18941401 by devin doucette in ue5-main branch]
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "Containers/StringFwd.h"
|
|
#include "Misc/AsciiSet.h"
|
|
|
|
class FDerivedDataCacheInterface;
|
|
class FQueuedThreadPool;
|
|
|
|
template <typename FuncType> class TUniqueFunction;
|
|
|
|
namespace UE::DerivedData { class FCacheRecord; }
|
|
namespace UE::DerivedData { class ICache; }
|
|
namespace UE::DerivedData { class IRequestOwner; }
|
|
namespace UE::DerivedData { struct FCacheKey; }
|
|
|
|
namespace UE::DerivedData::Private
|
|
{
|
|
|
|
// Created by CreateCache
|
|
extern FQueuedThreadPool* GCacheThreadPool;
|
|
|
|
// Implemented in DerivedDataCache.cpp
|
|
ICache* CreateCache(FDerivedDataCacheInterface** OutLegacyCache);
|
|
|
|
// Implemented in DerivedDataCacheRecord.cpp
|
|
uint64 GetCacheRecordCompressedSize(const FCacheRecord& Record);
|
|
uint64 GetCacheRecordTotalRawSize(const FCacheRecord& Record);
|
|
uint64 GetCacheRecordRawSize(const FCacheRecord& Record);
|
|
|
|
// Implemented in DerivedDataCacheStoreAsync.cpp
|
|
void ExecuteInCacheThreadPool(
|
|
IRequestOwner& Owner,
|
|
TUniqueFunction<void (IRequestOwner& Owner, bool bCancel)>&& Function);
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
template <typename CharType>
|
|
inline bool IsValidCacheBucketName(TStringView<CharType> Name)
|
|
{
|
|
constexpr FAsciiSet Valid("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
return !Name.IsEmpty() && Name.Len() < 256 && FAsciiSet::HasOnly(Name, Valid);
|
|
}
|
|
|
|
} // UE::DerivedData::Private
|