FDerivedDataCacheInterface

Interface for the derived data cache This API is fully threadsafe (with the possible exception of the system interface: NotfiyBootComplete, etc).

Windows
MacOS
Linux

References

Module

DerivedDataCache

Header

/Engine/Source/Developer/DerivedDataCache/Public/DerivedDataCacheInterface.h

Include

#include "DerivedDataCacheInterface.h"

Syntax

class FDerivedDataCacheInterface

Remarks

Interface for the derived data cache This API is fully threadsafe (with the possible exception of the system interface: NotfiyBootComplete, etc).

Destructors

Functions

Name Description

Public function

void

 

AddToAsyncCompletionCounter

(
    int32 Addend
)

Adds or subtracts a number from the thread safe counter which tracks outstanding async requests.

Public function

bool

 

AllCachedDataProbablyExists

(
    TConstArrayView< FString > CacheKey...
)

Returns true if the data associated with each key is likely to exist in the cache.

Public function Const

bool

 

AnyAsyncRequestsRemaining()

Are there any async DDC requests in progress?

Public function Static

FString

 

BuildCacheKey

(
    const TCHAR* PluginName,
    const TCHAR* VersionString,
    const TCHAR* PluginSpecificCac...
)

Static function to build a cache key out of the plugin name, versions and plugin specific info

Public function

bool

 

CachedDataProbablyExists

(
    const TCHAR* CacheKey
)

Returns true if the data associated with the key is likely to exist in the cache.

Public function

TBitArray

 

CachedDataProbablyExistsBatch

(
    TConstArrayView< FString > CacheKey...
)

Returns whether the data associated with each key is likely to exist in the cache.

Public function Const

void

 

GatherResourceStats

Public function Const

void

 

GatherSummaryStats

(
    FDerivedDataCacheSummaryStats& DDC...
)

Public function

void

 

GatherUsageStats

Retrieve usage stats by the DDC

Public function

uint32

 

GetAsynchronous

(
    const TCHAR* CacheKey,
    FStringView DebugContext
)

Starts the async process of checking the cache and if the item is present, retrieving the cached results.

Public function

uint32

 

GetAsynchronous

(
    FDerivedDataPluginInterface* D...
)

Starts the async process of checking the cache and if the item is present, retrieving the cached results, otherwise telling the deriver to build the data and then updating the cache If the plugin does not support threading, all of the above will be completed before the call returns.

Public function

bool

 

GetAsynchronousResults

(
    uint32 Handle,
    TArray< uint8 >& OutData,
    bool* bDataWasBuilt
)

Retrieves the results from an async lookup / build.

Public function

FOnDDCNotifi...

 

GetDDCNotificationEvent()

Retrieve the event delegate for cache put notifications

Public function Const

const TCHAR ...

 

GetDefaultGraphName()

Retrieve the name of the 'default' graph, which may or may not be the active graph currently.

Public function

void

 

GetDirectories

(
    TArray< FString >& OutResults
)

Retrieve the directories used by the DDC

Public function Const

const TCHAR ...

 

GetGraphName()

Retrieve the name of the graph used when configuring DDC

Public function

bool

 

GetSynchronous

(
    const TCHAR* CacheKey,
    TArray< uint8 >& OutData,
    FStringView DebugContext
)

Synchronously checks the cache and if the item is present, it returns the cached results, otherwise it returns false.

Public function

bool

 

GetSynchronous

(
    FDerivedDataPluginInterface* D...,
    TArray< uint8 >& OutData,
    bool* bDataWasBuilt
)

Synchronously checks the cache and if the item is present, it returns the cached results, otherwise tells the deriver to build the data and then updates the cache

Public function Const

bool

 

GetUsingSharedDDC()

Retrieve whether a Shared DDC is being used

Public function Const

bool

 

IsDefaultGraph()

Are we currently using the default graph configuration?

Public function Static

bool

 

IsValidCacheChar

(
    const TCHAR C
)

Low Level Static Helpers.

Public function

void

 

MarkTransient

(
    const TCHAR* CacheKey
)

Hint that the data associated with the key is transient and may be optionally purged from the cache.

Public function

void

 

NotifyBootComplete()

Notify the system that the boot process is complete and so we can write the boot cache and get rid of it

Public function

bool

 

PollAsynchronousCompletion

(
    uint32 Handle
)

Polls a previous GetAsynchronous get for completion.

Public function

void

 

Put

(
    const TCHAR* CacheKey,
    TArrayView< const uint8 > Data,
    FStringView DataContext,
    bool bPutEvenIfExists
)

Puts data into the cache.

Public function Static

FString

 

SanitizeCacheKey

(
    const TCHAR* CacheKey
)

Static function to make sure a cache key contains only legal characters by using an escape

Public function

bool

 

TryToPrefetch

(
    TConstArrayView< FString > CacheKey...,
    FStringView DebugContext
)

Synchronous attempt to make sure the cached data will be available as optimally as possible.

Public function

void

 

WaitAsynchronousCompletion

(
    uint32 Handle
)

Blocks the current thread until an previous GetAsynchronous request is ready

Public function

void

 

WaitForQuiescence

(
    bool bShutdown
)

Wait for all outstanding async DDC operations to complete.

Enums

Name

Description

Public enum

EDDCNotification

Typedefs

Name

Description

FOnDDCNotification

Deprecated Functions

Name Description

Public function Const

TSharedRef< ...

 

GatherUsageStats()

This overload of GatherUsageStats is temporary. Please use other overload.

Public function

uint32

 

GetAsynchronous

(
    const TCHAR* CacheKey
)

'GetAsynchronous' without a DebugContext is deprecated. Please provide a DebugContext!

Public function Const

IDDCCleanup ...

 

GetCleanup()

This has been replaced by UE::DerivedData::GetCache().GetMaintainer().

Public function

bool

 

GetSynchronous

(
    const TCHAR* CacheKey,
    TArray< uint8 >& OutData
)

'GetSynchronous' without a DebugContext is deprecated. Please provide a DebugContext!

Public function

void

 

Put

(
    const TCHAR* CacheKey,
    TArray< uint8 >& Data,
    bool bPutEvenIfExists
)

'Put' without a DebugContext is deprecated. Please provide a DebugContext!