UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::IoStore::FJournaledCache Class Referencefinal
+ Inheritance diagram for UE::IoStore::FJournaledCache:

Public Member Functions

 FJournaledCache (FDiskCacheGovernor &DiskCacheGovernor)
 
 ~FJournaledCache ()
 
bool Initialize (const TCHAR *RootDir, const FIasCacheConfig &Config)
 
virtual void Abandon () override
 
virtual void Drop () override
 
virtual bool ContainsChunk (const FIoHash &Key) const override
 
virtual EIoErrorCode Get (const FIoHash &Key, FIoBuffer &OutData) override
 
virtual void Materialize (const FIoHash &Key, FIoBuffer &Dest, EIoErrorCode &Status, UE::Tasks::FTaskEvent DoneEvent) override
 
virtual void Cancel (FIoBuffer &GivenDest) override
 
virtual FIoStatus Put (const FIoHash &Key, FIoBuffer &Data) override
 
virtual FIoStatus Evict (const FIoHash &Key) override
 
- Public Member Functions inherited from UE::IoStore::IIasCache
virtual ~IIasCache ()=default
 

Constructor & Destructor Documentation

◆ FJournaledCache()

UE::IoStore::FJournaledCache::FJournaledCache ( FDiskCacheGovernor DiskCacheGovernor)

◆ ~FJournaledCache()

UE::IoStore::FJournaledCache::~FJournaledCache ( )

Member Function Documentation

◆ Abandon()

void UE::IoStore::FJournaledCache::Abandon ( )
overridevirtual

Deletes the IAS object, dropping all data persisted to disk and releasing OS resources. As this also deletes the object thus any unique pointers should be released prior to abandonment; TUniquePtr->Release()->Abandon(). Be sure to cancel and collect any Get() tasks beforehand.

Implements UE::IoStore::IIasCache.

◆ Cancel()

void UE::IoStore::FJournaledCache::Cancel ( FIoBuffer GivenDest)
overridevirtual

Cancels a previously request to Materialize(). Note that the materialize already can still complete as the read operation may already be in flight. If the cancel succeeds, the materialize's DoneEvent is not triggered.

Implements UE::IoStore::IIasCache.

◆ ContainsChunk()

bool UE::IoStore::FJournaledCache::ContainsChunk ( const FIoHash Key) const
overridevirtual

Returns whether the specified cache key is present in the cache.

Implements UE::IoStore::IIasCache.

◆ Drop()

void UE::IoStore::FJournaledCache::Drop ( )
overridevirtual

Clears out the cache and resets it back to the default state.

Implements UE::IoStore::IIasCache.

◆ Evict()

FIoStatus UE::IoStore::FJournaledCache::Evict ( const FIoHash Key)
overridevirtual

Evict an item from the cache. For example it might be corrupt

Implements UE::IoStore::IIasCache.

◆ Get()

EIoErrorCode UE::IoStore::FJournaledCache::Get ( const FIoHash Key,
FIoBuffer OutData 
)
overridevirtual

Get the chunk associated with the specified cache key. If the data is already in memory it is return in OutData. Otherwise the returned status indicates if the key can be materialized or if it does not exist

Implements UE::IoStore::IIasCache.

◆ Initialize()

bool UE::IoStore::FJournaledCache::Initialize ( const TCHAR RootDir,
const FIasCacheConfig Config 
)

◆ Materialize()

void UE::IoStore::FJournaledCache::Materialize ( const FIoHash Key,
FIoBuffer Dest,
EIoErrorCode Status,
UE::Tasks::FTaskEvent  DoneEvent 
)
overridevirtual

Materializes a cached items data from disk. The data is read into Dest so Dest must remain valid throughout. The result of the disk read is returned in Status (same lifetime needs as Dest). DoneEvent is triggered when the read succeeds, is not found, or if an IO error occurred.

Implements UE::IoStore::IIasCache.

◆ Put()

FIoStatus UE::IoStore::FJournaledCache::Put ( const FIoHash Key,
FIoBuffer Data 
)
overridevirtual

Insert a new chunk into the cache.

Implements UE::IoStore::IIasCache.


The documentation for this class was generated from the following file: