UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FRuntimeAssetCacheBackend Class Referenceabstract

#include <RuntimeAssetCacheBackend.h>

+ Inheritance diagram for FRuntimeAssetCacheBackend:

Public Member Functions

FCacheEntryMetadataGetCachedData (FName Bucket, const TCHAR *CacheKey, void *&OutData, int64 &OutDataSize)
 
bool PutCachedData (FName Bucket, const TCHAR *CacheKey, void *InData, int64 InDataSize, FCacheEntryMetadata *Metadata)
 
virtual bool RemoveCacheEntry (FName Bucket, const TCHAR *CacheKey)=0
 
virtual bool ClearCache ()=0
 
virtual bool ClearCache (FName Bucket)=0
 
virtual FRuntimeAssetCacheBucketPreLoadBucket (FName BucketName, int32 BucketSize)=0
 

Static Public Member Functions

static FRuntimeAssetCacheBackendGet ()
 

Protected Member Functions

virtual ~FRuntimeAssetCacheBackend ()
 
virtual FArchiveCreateReadArchive (FName Bucket, const TCHAR *CacheKey)=0
 
virtual FArchiveCreateWriteArchive (FName Bucket, const TCHAR *CacheKey)=0
 
FCacheEntryMetadataPreloadMetadata (FArchive *Ar)
 
- Protected Member Functions inherited from FNoncopyable
 FNoncopyable ()
 
 ~FNoncopyable ()
 

Detailed Description

Facade for runtime asset cache backend. Currently only file system backend is available.

Constructor & Destructor Documentation

◆ ~FRuntimeAssetCacheBackend()

virtual FRuntimeAssetCacheBackend::~FRuntimeAssetCacheBackend ( )
inlineprotectedvirtual

Member Function Documentation

◆ ClearCache() [1/2]

virtual bool FRuntimeAssetCacheBackend::ClearCache ( )
pure virtual

Removes all entries from cache.

Returns
True if successfully removed all entries from cache.

Implemented in FRuntimeAssetCacheFilesystemBackend.

◆ ClearCache() [2/2]

virtual bool FRuntimeAssetCacheBackend::ClearCache ( FName  Bucket)
pure virtual

Removes all entries from given bucket.

Parameters
BucketBucket to clean.
Returns
True if successfully removed all entries from cache.

Implemented in FRuntimeAssetCacheFilesystemBackend.

◆ CreateReadArchive()

virtual FArchive * FRuntimeAssetCacheBackend::CreateReadArchive ( FName  Bucket,
const TCHAR CacheKey 
)
protectedpure virtual

◆ CreateWriteArchive()

virtual FArchive * FRuntimeAssetCacheBackend::CreateWriteArchive ( FName  Bucket,
const TCHAR CacheKey 
)
protectedpure virtual

◆ Get()

static FRuntimeAssetCacheBackend & FRuntimeAssetCacheBackend::Get ( )
inlinestatic

Singleton getter.

Returns
Backend implementation.

◆ GetCachedData()

FCacheEntryMetadata * FRuntimeAssetCacheBackend::GetCachedData ( FName  Bucket,
const TCHAR CacheKey,
void *&  OutData,
int64 OutDataSize 
)

Retrieves cached entry.

Parameters
BucketBucket to query.
CacheKeyKey of cache entry to retrieve.
OutDataSerialized cache entry. Emptied if entry not found.
Returns
Metadata descriptor of cache entry on cache hit, nullptr otherwise.

◆ PreLoadBucket()

virtual FRuntimeAssetCacheBucket * FRuntimeAssetCacheBackend::PreLoadBucket ( FName  BucketName,
int32  BucketSize 
)
pure virtual

Preloads cache metadata and size for given bucket.

Parameters
BucketNameName of bucket to preload.
BucketSizeSize of bucket to preload.
Returns
Preloaded bucket on success, nullptr otherwise.

Implemented in FRuntimeAssetCacheFilesystemBackend.

◆ PreloadMetadata()

FCacheEntryMetadata * FRuntimeAssetCacheBackend::PreloadMetadata ( FArchive Ar)
protected

◆ PutCachedData()

bool FRuntimeAssetCacheBackend::PutCachedData ( FName  Bucket,
const TCHAR CacheKey,
void InData,
int64  InDataSize,
FCacheEntryMetadata Metadata 
)

Puts entry to cache.

Parameters
BucketBucket to put entry to.
CacheKeyKey of cache entry to retrieve.
InDataSerialized cache entry.
Metadatadescriptor of cache entry.
Returns
True if successfully put entry into cache.

◆ RemoveCacheEntry()

virtual bool FRuntimeAssetCacheBackend::RemoveCacheEntry ( FName  Bucket,
const TCHAR CacheKey 
)
pure virtual

Removes entry from cache.

Parameters
BucketBucket to remove entry from.
CacheKeyKey of cache entry to remove.
Returns
True if successfully removed entry from cache.

Implemented in FRuntimeAssetCacheFilesystemBackend.


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