UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
OnDemandInstallCache.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "IO/OnDemandError.h"
9
10struct FIoContainerHeader;
11
12namespace UE::IoStore
13{
14
15class FOnDemandContentHandle;
16class FOnDemandIoStore;
17struct FOnDemandInstallCacheUsage;
19
26
29{
30public:
31 virtual ~IOnDemandInstallCache() = default;
32 virtual bool IsChunkCached(const FIoHash& ChunkHash) = 0;
33 virtual bool TryPinChunks(
35 TConstArrayView<int32> EntryIndices,
36 FOnDemandContentHandle ContentHandle,
38 virtual FResult PutChunk(FIoBuffer&& Chunk, const FIoHash& ChunkHash) = 0;
40 virtual FResult PurgeAllUnreferenced(bool bDefrag, const uint64* BytesToPurge = nullptr) = 0;
41 virtual FResult DefragAll(const uint64* BytesToFree = nullptr) = 0;
42 virtual FResult Verify() = 0;
43 virtual FResult Flush() = 0;
44 virtual FResult FlushLastAccess() = 0;
45 virtual void UpdateLastAccess(TConstArrayView<FIoHash> ChunkHashes) = 0;
47};
48
50{
52 uint64 DiskQuota = 1ull << 30;
53 uint64 JournalMaxSize = 2ull << 20;
55 bool bDropCache = false;
56};
57
59 FOnDemandIoStore& IoStore,
60 const FOnDemandInstallCacheConfig& Config,
61 class FDiskCacheGovernor& Governor);
62
63} // namespace UE::IoStore
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition IoBuffer.h:15
Definition Array.h:670
Definition SharedPointer.h:692
Definition DiskCacheGovernor.h:13
Definition IoStoreOnDemand.h:88
Definition OnDemandIoStore.h:332
Definition OnDemandInstallCache.h:29
virtual bool TryPinChunks(const FSharedOnDemandContainer &Container, TConstArrayView< int32 > EntryIndices, FOnDemandContentHandle ContentHandle, TArray< int32 > &OutMissing)=0
virtual bool IsChunkCached(const FIoHash &ChunkHash)=0
virtual FResult PurgeAllUnreferenced(bool bDefrag, const uint64 *BytesToPurge=nullptr)=0
virtual void UpdateLastAccess(TConstArrayView< FIoHash > ChunkHashes)=0
virtual ~IOnDemandInstallCache()=default
virtual FResult PutChunk(FIoBuffer &&Chunk, const FIoHash &ChunkHash)=0
virtual FResult Purge(uint64 BytesToInstall)=0
virtual FResult FlushLastAccess()=0
virtual FResult DefragAll(const uint64 *BytesToFree=nullptr)=0
virtual FOnDemandInstallCacheUsage GetCacheUsage()=0
NO_LOGGING.
Definition Client.h:20
TSharedPtr< struct FOnDemandContainer, ESPMode::ThreadSafe > FSharedOnDemandContainer
Definition OnDemandContentInstaller.h:30
TSharedPtr< IOnDemandInstallCache > MakeOnDemandInstallCache(FOnDemandIoStore &IoStore, const FOnDemandInstallCacheConfig &Config, FDiskCacheGovernor &Governor)
Definition OnDemandInstallCache.cpp:3708
Definition IoContainerHeader.h:110
Definition IoHash.h:33
Definition IoDispatcherBackend.h:186
Definition OnDemandInstallCache.h:50
bool bDropCache
Definition OnDemandInstallCache.h:55
FString RootDirectory
Definition OnDemandInstallCache.h:51
uint64 JournalMaxSize
Definition OnDemandInstallCache.h:53
double LastAccessGranularitySeconds
Definition OnDemandInstallCache.h:54
uint64 DiskQuota
Definition OnDemandInstallCache.h:52
Definition OnDemandInstallCache.h:21
uint64 TotalSize
Definition OnDemandInstallCache.h:23
uint64 ReferencedBlockSize
Definition OnDemandInstallCache.h:24
uint64 MaxSize
Definition OnDemandInstallCache.h:22
Definition IoStoreOnDemand.h:487