![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <RuntimeAssetCacheBucket.h>
Public Member Functions | |
| FRuntimeAssetCacheBucket () | |
| FRuntimeAssetCacheBucket (int32 InSize) | |
| ~FRuntimeAssetCacheBucket () | |
| int32 | GetSize () const |
| void | Reset () |
| FCacheEntryMetadata * | GetMetadata (const FString &Key) |
| void | RemoveMetadataEntry (const FString &Key, bool bBuildFailed=false) |
| void | AddMetadataEntry (const FString &Key, FCacheEntryMetadata *Value, bool bUpdateSize) |
| int32 | GetCurrentSize () |
| void | AddToCurrentSize (int32 Value) |
| FCacheEntryMetadata * | GetOldestEntry () |
Static Public Attributes | |
| static const int32 | DefaultBucketSize = 5 * 1024 * 1024 |
Friends | |
| class | FRuntimeAssetCacheBucketScopeLock |
Holds data about cache entries.
|
inline |
Default constructor.
|
inline |
Constructor
| InSize | Size of bucket in bytes. |
| FRuntimeAssetCacheBucket::~FRuntimeAssetCacheBucket | ( | ) |
Destructor.
| void FRuntimeAssetCacheBucket::AddMetadataEntry | ( | const FString & | Key, |
| FCacheEntryMetadata * | Value, | ||
| bool | bUpdateSize | ||
| ) |
Adds metadata entry for given key.
| Key | Key to add metadata for. |
| Value | Metadata to add. If there is an entry for given key, it gets overwritten. |
| bUpdateSize | If true, function will update current size of bucket. Otherwise, it's up to caller. |
If overwriting, keep proper record of used cache size.
Adds to number of bytes used in cache so far.
| Value | Number of bytes to add. Can be negative. |
|
inline |
Gets number of bytes used in cache so far.
| FCacheEntryMetadata * FRuntimeAssetCacheBucket::GetMetadata | ( | const FString & | Key | ) |
Gets metadata entry for given key.
| Key | Key to get metadata for. |
| FCacheEntryMetadata * FRuntimeAssetCacheBucket::GetOldestEntry | ( | ) |
Gets oldest metadata entry in cache.
|
inline |
Gets size in bytes of the bucket.
| void FRuntimeAssetCacheBucket::RemoveMetadataEntry | ( | const FString & | Key, |
| bool | bBuildFailed = false |
||
| ) |
Removes metadata entry for given key.
| Key | Key to remove metadata for. |
| bBuildFailed | Indicates that building cache entry failed and some checks should be skipped. |
| void FRuntimeAssetCacheBucket::Reset | ( | ) |
Cleans up all metadata entries.
|
friend |
Helper friend class to guard critical sections on scope basis.
|
static |
Default size of bucket in case it wasn't specified in config.