2021-03-10 12:23:29 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-10-20 11:50:36 -04:00
|
|
|
#include "CoreTypes.h"
|
2021-03-10 12:23:29 -04:00
|
|
|
#include "Containers/StringFwd.h"
|
2021-05-31 12:43:42 -04:00
|
|
|
#include "Misc/AsciiSet.h"
|
2021-03-10 12:23:29 -04:00
|
|
|
|
2021-05-21 12:24:43 -04:00
|
|
|
class FDerivedDataCacheInterface;
|
|
|
|
|
|
2022-02-10 14:57:42 -05:00
|
|
|
template <typename FuncType> class TUniqueFunction;
|
|
|
|
|
|
2021-10-20 11:50:36 -04:00
|
|
|
namespace UE::DerivedData { class FCacheRecord; }
|
2021-08-05 13:12:08 -04:00
|
|
|
namespace UE::DerivedData { class ICache; }
|
2022-02-10 14:57:42 -05:00
|
|
|
namespace UE::DerivedData { class IRequestOwner; }
|
2021-03-10 12:23:29 -04:00
|
|
|
|
2021-04-19 09:56:34 -04:00
|
|
|
namespace UE::DerivedData::Private
|
2021-03-10 17:33:38 -04:00
|
|
|
{
|
|
|
|
|
|
2021-05-21 12:24:43 -04:00
|
|
|
// Implemented in DerivedDataCache.cpp
|
2021-08-05 13:12:08 -04:00
|
|
|
ICache* CreateCache(FDerivedDataCacheInterface** OutLegacyCache);
|
2022-03-23 16:56:39 -04:00
|
|
|
void LaunchTaskInCacheThreadPool(IRequestOwner& Owner, TUniqueFunction<void ()>&& TaskBody);
|
2021-05-21 12:24:43 -04:00
|
|
|
|
2021-10-20 11:50:36 -04:00
|
|
|
// Implemented in DerivedDataCacheRecord.cpp
|
|
|
|
|
uint64 GetCacheRecordCompressedSize(const FCacheRecord& Record);
|
|
|
|
|
uint64 GetCacheRecordTotalRawSize(const FCacheRecord& Record);
|
|
|
|
|
uint64 GetCacheRecordRawSize(const FCacheRecord& Record);
|
|
|
|
|
|
2021-05-31 12:43:42 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2021-08-06 12:53:08 -04:00
|
|
|
template <typename CharType>
|
|
|
|
|
inline bool IsValidCacheBucketName(TStringView<CharType> Name)
|
2021-05-31 12:43:42 -04:00
|
|
|
{
|
|
|
|
|
constexpr FAsciiSet Valid("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
|
|
|
return !Name.IsEmpty() && Name.Len() < 256 && FAsciiSet::HasOnly(Name, Valid);
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-19 09:56:34 -04:00
|
|
|
} // UE::DerivedData::Private
|