IFileCacheHandle

Thready safety note: Once created a [IFileCacheHandle](API\Runtime\Core\FileCache\IFileCacheHandle) is assumed to be only used from a single thread.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/FileCache/FileCache.h

Include

#include "FileCache/FileCache.h"

Syntax

class IFileCacheHandle

Remarks

Thready safety note: Once created a IFileCacheHandle is assumed to be only used from a single thread. (i.e. the IFileCacheHandle interface is not thread safe, and the user will need to ensure serialization). Of course you can create several IFileCacheHandle's on separate threads if needed. And obviously Internally threading will also be used to do async IO and cache management.

Also note, if you create several IFileCacheHandle's to the same file on separate threads these will be considered as individual separate files from the cache point of view and thus each will have their own cache data allocated.

Destructors

Name Description

Public function Virtual

~IFileCacheHandle()

Functions

Name Description

Public function Static

IFileCacheHa...

 

CreateFileCacheHandle

(
    const TCHAR* InFileName
)

Create a IFileCacheHandle from a filename.

Public function Static

IFileCacheHa...

 

CreateFileCacheHandle

(
    IAsyncReadFileHandle* FileHand...
)

Create a IFileCacheHandle from a IAsyncReadFileHandle.

Public function Static

void

 

EvictAll()

Public function Static

uint32

 

GetFileCacheSize()

Return size of underlying file cache in bytes.

Public function

FGraphEventR...

 

PreloadData

(
    const FFileCachePreloadEntry* ...,
    int32 NumEntries,
    EAsyncIOPriorityAndFlags Priority
)

Public function

IMemoryReadS...

 

ReadData

(
    FGraphEventArray& OutCompletionEve...,
    int64 Offset,
    int64 BytesToRead,
    EAsyncIOPriorityAndFlags Priority
)

Read a byte range form the file.

Public function

void

 

WaitAll()

Wait until all outstanding read requests complete.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss