UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RuntimeAssetCacheAsyncWorker.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "UObject/NameTypes.h"
8#include "Stats/Stats.h"
9#include "Async/AsyncWork.h"
12
15class UClass;
16
23
27
32{
33public:
36
38 void DoWork();
39 TStatId GetStatId() const;
43 void* GetData()
44 {
45 return Data;
46 }
47
50 {
51 return DataSize;
52 }
53
56 {
57 return FVoidPtrParam(Data, DataSize);
58 }
59
64
65private:
70 bool FiredCompletionDelegate() const
71 {
72 return bFiredCompletionDelegate;
73 }
74
80 static FString SanitizeCacheKey(const TCHAR* CacheKey);
81
89 static FString BuildCacheKey(const TCHAR* VersionString, const TCHAR* PluginSpecificCacheKeySuffix);
90
96 static FString BuildCacheKey(IRuntimeAssetCacheBuilder* CacheBuilder);
97
103 void FreeCacheSpace(FName Bucket, int32 SizeOfSpaceToFreeInBytes);
104
106 IRuntimeAssetCacheBuilder* CacheBuilder;
107
109 void* Data;
110
112 int64 DataSize;
113
116
121 bool bEntryRetrieved;
122
124 FOnRuntimeAssetCacheAsyncComplete CompletionCallback;
125
127 int32 Handle;
128
130 bool bFiredCompletionDelegate;
131
132 UClass* Class;
133};
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN(CounterName, StatId, GroupId, API)
Definition Stats.h:684
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition NameTypes.h:617
Definition AsyncWork.h:663
Definition RuntimeAssetCacheAsyncWorker.h:32
TStatId GetStatId() const
Definition RuntimeAssetCacheAsyncWorker.cpp:159
int64 GetDataSize()
Definition RuntimeAssetCacheAsyncWorker.h:49
void FireCompletionDelegate()
Definition RuntimeAssetCacheAsyncWorker.cpp:164
void DoWork()
Definition RuntimeAssetCacheAsyncWorker.cpp:29
FVoidPtrParam GetDataAndSize()
Definition RuntimeAssetCacheAsyncWorker.h:55
void * GetData()
Definition RuntimeAssetCacheAsyncWorker.h:43
Definition RuntimeAssetCacheBucket.h:20
Definition RuntimeAssetCachePluginInterface.h:25
Definition UnrealString.h.inl:34
Definition Class.h:3793
Definition RuntimeAssetCacheInterface.h:23
Definition LightweightStats.h:416