CacheDir

CacheDir

#Overview

name: CacheDir

The value of this variable can be defined or overridden in .ini config files. 2 .ini config files referencing this setting variable.

It is referenced in 31 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of CacheDir is to provide a directory path for storing cached data in various Unreal Engine subsystems and plugins. It is used across different modules to manage temporary or persistent data storage.

CacheDir is utilized by several Unreal Engine subsystems, plugins, and modules, including:

  1. Datasmith CAD Importer
  2. Chaos Flesh Engine
  3. Online Subsystem EOS (Epic Online Services)
  4. HTTP Chunk Installer
  5. S3 Cache Store
  6. IoStore On Demand
  7. Pipeline File Cache

The value of CacheDir is typically set within the initialization or startup functions of the respective modules. It is often derived from project-specific paths or platform-specific storage locations.

CacheDir often interacts with other variables and functions related to file management, such as FPaths, IFileManager, and platform-specific file operations.

Developers should be aware of the following when using CacheDir:

  1. Ensure proper permissions and available space in the cache directory.
  2. Handle potential conflicts when multiple modules use the same cache directory.
  3. Implement cleanup mechanisms to prevent excessive cache growth.
  4. Consider platform-specific differences in cache directory locations.

Best practices for using CacheDir include:

  1. Use FPaths functions to ensure cross-platform compatibility when constructing cache paths.
  2. Implement version control for cached data to handle updates gracefully.
  3. Use appropriate locking mechanisms when multiple threads access the cache directory.
  4. Regularly clean up outdated or unnecessary cached data.
  5. Provide user options to clear the cache when needed.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/Custom/EOS/DefaultEngine.ini:20, section: [/Script/OnlineSubsystemEOS.EOSSettings]

Location: <Workspace>/Projects/Lyra/Config/Custom/SteamEOS/DefaultEngine.ini:25, section: [/Script/OnlineSubsystemEOS.EOSSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithCADImporter/Source/DatasmithCADTranslator/Private/DatasmithCADTranslatorModule.cpp:37

Scope (from outer to inner):

file
function     void FDatasmithCADTranslatorModule::StartupModule

Source code excerpt:


	// Create root cache directory which will be used by cad library sdk to store import data
	CacheDir = FPaths::ConvertRelativePathToFull(FPaths::Combine(FPaths::ProjectIntermediateDir(), TEXT("DatasmithCADCache"), *FString::FromInt(CacheVersion)));
	if (!IFileManager::Get().MakeDirectory(*CacheDir, true))
	{
		CacheDir.Empty();
		CADLibrary::FImportParameters::bGEnableCADCache = false; // very weak protection: user could turn that on later, while the cache path is invalid
	}

	// Create body cache directory since this one is used even if bGEnableCADCache is false
	if (!CacheDir.IsEmpty())
	{
		IFileManager::Get().MakeDirectory(*FPaths::Combine(CacheDir, TEXT("body")), true);
	}

	Datasmith::RegisterTranslator<FDatasmithCADTranslator>();
}

void FDatasmithCADTranslatorModule::ShutdownModule()

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithCADImporter/Source/DatasmithCADTranslator/Private/DatasmithCADTranslatorModule.cpp:61

Scope (from outer to inner):

file
function     FString FDatasmithCADTranslatorModule::GetCacheDir

Source code excerpt:

FString FDatasmithCADTranslatorModule::GetCacheDir() const
{
	return CacheDir;
}

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithCADImporter/Source/DatasmithCADTranslator/Public/DatasmithCADTranslatorModule.h:33

Scope (from outer to inner):

file
class        class FDatasmithCADTranslatorModule : public IModuleInterface

Source code excerpt:

private:
	FString TempDir;
	FString CacheDir;
};

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithCADImporter/Source/DatasmithPLMXMLTranslator/Private/DatasmithPlmXmlImporter.cpp:239

Scope (from outer to inner):

file
namespace    PlmXml
class        class FPlmXmlMeshLoaderWithDatasmithDispatcher

Source code excerpt:

		TArray<FString> FilePaths;

		FString CacheDir;

		FPlmXmlMeshLoaderWithDatasmithDispatcher(TSharedRef<IDatasmithScene> InDatasmithScene, FDatasmithTessellationOptions& InTessellationOptions)
			: DatasmithScene(InDatasmithScene)
			, TessellationOptions(InTessellationOptions)
		{
			FCADToolsModule& CADToolsModule = FCADToolsModule::Get();
			
			CacheDir = FPaths::ConvertRelativePathToFull(FPaths::Combine(FPaths::ProjectIntermediateDir(), TEXT("DatasmithCADCache"), *FString::FromInt(CADToolsModule.GetCacheVersion())));
			IFileManager::Get().MakeDirectory(*CacheDir);

			// Setup of import parameters for DatasmithDispatcher copied from FDatasmithCADTranslator's setup
			ImportParameters.SetTesselationParameters(TessellationOptions.ChordTolerance, TessellationOptions.MaxEdgeLength, TessellationOptions.NormalTolerance, (CADLibrary::EStitchingTechnique) TessellationOptions.StitchingTechnique);

			DatasmithDispatcher = MakeUnique<DatasmithDispatcher::FDatasmithDispatcher>(ImportParameters, CacheDir, CADFileToUEFileMap, CADFileToUEGeomMap);
		}

		// Adds geom file to load and returns Id to use in InstantiateMesh later(after all is loaded)
		int32 AddMeshToLoad(const FString& FullPath)
		{
			using namespace CADLibrary;

#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithCADImporter/Source/DatasmithPLMXMLTranslator/Private/DatasmithPlmXmlImporter.cpp:285

Scope (from outer to inner):

file
namespace    PlmXml
class        class FPlmXmlMeshLoaderWithDatasmithDispatcher
function     void Process

Source code excerpt:

		{
			DatasmithDispatcher->Process(CADLibrary::GMaxImportThreads != 1);
			SceneGraphBuilder = MakeUnique<FDatasmithSceneGraphBuilder>(CADFileToUEFileMap, CacheDir, DatasmithScene, Source, ImportParameters);
			SceneGraphBuilder->LoadSceneGraphDescriptionFiles();
			MeshBuilderPtr = MakeUnique<FDatasmithMeshBuilder>(CADFileToUEGeomMap, CacheDir, ImportParameters);
		}

		void UnloadScene()
		{
			MeshBuilderPtr.Reset();
			SceneGraphBuilder.Reset();

#Loc: <Workspace>/Engine/Plugins/Experimental/ChaosFlesh/Source/ChaosFleshEngine/Private/ChaosCache/FleshComponentCacheAdapter.cpp:475

Scope (from outer to inner):

file
namespace    Chaos
function     FString GetCacheDirectory

Source code excerpt:

	{
		// USDCacheDirectory is relative to the content dir, but with "/Game" rather than just "/" or some relative path.
		FString CacheDir = InObserved.USDCacheDirectory.Path;
		if (CacheDir.IsEmpty())
		{
			CacheDir = FString(TEXT("SimCache"));
		}
		FPaths::NormalizeDirectoryName(CacheDir);
		if (CacheDir.StartsWith(FString(TEXT("/Game"))))
		{
			CacheDir = FPaths::Combine(FPaths::ProjectContentDir(), CacheDir.RightChop(5));
		}
		return CacheDir;
	}

	FString GetCacheFileName(const UFleshComponent* FleshComp)
	{
		const UObject* CurrObject = FleshComp;
		const AActor* Actor = nullptr;

#Loc: <Workspace>/Engine/Plugins/Experimental/ChaosFlesh/Source/ChaosFleshEngine/Private/ChaosCache/FleshComponentCacheAdapter.cpp:530

Scope (from outer to inner):

file
namespace    Chaos
function     bool FFleshCacheAdapter::InitializeForRecord

Source code excerpt:


				FString CompName = GetCacheFileName(FleshComp);
				FString CacheDir = GetCacheDirectory(InObserved);
				FPlatformFileManager& FileManager = FPlatformFileManager::Get();
				IPlatformFile& PlatformFile = FileManager.GetPlatformFile();
				if (!PlatformFile.DirectoryExists(*CacheDir))
				{
					if (!PlatformFile.CreateDirectoryTree(*CacheDir))
					{
						UE_LOG(LogChaosFleshCache, Error, TEXT("Failed to create output directory: '%s'"), *CacheDir);
						return false;
					}
				}

				const UFleshAsset* RestCollectionAsset = FleshComp->GetRestCollection();
				const FFleshCollection* RestCollection = RestCollectionAsset ? RestCollectionAsset->GetCollection() : nullptr;

#Loc: <Workspace>/Engine/Plugins/Experimental/ChaosFlesh/Source/ChaosFleshEngine/Private/ChaosCache/FleshComponentCacheAdapter.cpp:556

Scope (from outer to inner):

file
namespace    Chaos
function     bool FFleshCacheAdapter::InitializeForRecord

Source code excerpt:

					FString Ext = CVarParams.bWriteBinary ? FString(TEXT("usd")) : FString(TEXT("usda"));
					FString FileName = FString::Printf(TEXT("%s.%s"), *CompName, *Ext);
					FilePath = FPaths::Combine(CacheDir, FileName);
					if (CVarParams.bNoClobber)
					{
						if (PlatformFile.FileExists(*FilePath))
						{
							// Rename the file to 'path/to/file.usd' to 'path/to/file_#.usd', where '#' 
							// is a unique version number.

#Loc: <Workspace>/Engine/Plugins/Experimental/ChaosFlesh/Source/ChaosFleshEngine/Private/ChaosCache/FleshComponentCacheAdapter.cpp:567

Scope (from outer to inner):

file
function     bool FFleshCacheAdapter::InitializeForRecord

Source code excerpt:

							do {
								FString UniqueCompName = FString::Printf(TEXT("%s_%d.%s"), *CompName, i++, *Ext);
								UniqueFilePath = FPaths::Combine(CacheDir, UniqueCompName);
							} while (PlatformFile.FileExists(*UniqueFilePath));

							if (!PlatformFile.MoveFile(*UniqueFilePath, *FilePath))
							{
								UE_LOG(LogChaosFleshCache, Error, TEXT("Failed to rename file from '%s' to '%s'."), *FilePath, *UniqueFilePath);
								return false;

#Loc: <Workspace>/Engine/Plugins/Experimental/ChaosFlesh/Source/ChaosFleshEngine/Private/ChaosCache/FleshComponentCacheAdapter.cpp:626

Scope (from outer to inner):

file
namespace    Chaos
function     bool FFleshCacheAdapter::InitializeForPlayback

Source code excerpt:

				//

				FString CacheDir = GetCacheDirectory(InObserved);
				FString CompName = GetCacheFileName(FleshComp);
				PrimPath = UsdUtils::GetPrimPathForObject(FleshComp);
				if (bUseMonolith)
				{
					bReadOnly = true;
					FString Ext = CVarParams.bWriteBinary ? FString(TEXT("usd")) : FString(TEXT("usda"));
					FString FileName = FString::Printf(TEXT("%s.%s"), *CompName, *Ext);
					FilePath = FPaths::Combine(CacheDir, FileName);

					FPlatformFileManager& FileManager = FPlatformFileManager::Get();
					IPlatformFile& PlatformFile = FileManager.GetPlatformFile();
					if (PlatformFile.FileExists(*FilePath))
					{
						if (MonolithStage)

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:171

Scope (from outer to inner):

file
function     const FEOSSettings& UEOSSettings::ManualGetSettings

Source code excerpt:

		CachedSettings.Emplace();

		GConfig->GetString(INI_SECTION, TEXT("CacheDir"), CachedSettings->CacheDir, GEngineIni);
		GConfig->GetString(INI_SECTION, TEXT("DefaultArtifactName"), CachedSettings->DefaultArtifactName, GEngineIni);
		GConfig->GetString(INI_SECTION, TEXT("SteamTokenType"), CachedSettings->SteamTokenType, GEngineIni);
		CachedSettings->RTCBackgroundMode = EOS_ERTCBackgroundMode::EOS_RTCBM_KeepRoomsAlive;
		FString RTCBackgroundModeStr;
		GConfig->GetString(INI_SECTION, TEXT("RTCBackgroundMode"), RTCBackgroundModeStr, GEngineIni);
		if (!RTCBackgroundModeStr.IsEmpty())

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:205

Scope (from outer to inner):

file
function     FEOSSettings UEOSSettings::ToNative

Source code excerpt:

	FEOSSettings Native;

	Native.CacheDir = CacheDir;
	Native.DefaultArtifactName = DefaultArtifactName;
	Native.SteamTokenType = SteamTokenType;
	Native.RTCBackgroundMode = EOS_ERTCBackgroundMode::EOS_RTCBM_KeepRoomsAlive;
	if (!RTCBackgroundMode.IsEmpty())
	{
		LexFromString(Native.RTCBackgroundMode, *RTCBackgroundMode);

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/OnlineSubsystemEOS.cpp:225

Scope (from outer to inner):

file
function     bool FOnlineSubsystemEOS::PlatformCreate

Source code excerpt:


	// Make the cache directory be in the user's writable area
	FString CacheDir;
	
	if (FPlatformMisc::IsCacheStorageAvailable())
	{
		CacheDir = EOSSDKManager->GetCacheDirBase() / ArtifactSettings.ArtifactName / EOSSettings.CacheDir;
	}
	const auto CacheDirUtf8 = StringCast<UTF8CHAR>(*CacheDir);
	PlatformOptions.CacheDirectory = CacheDir.IsEmpty() ? nullptr : (const char*)CacheDirUtf8.Get();

#if WITH_EOS_RTC
	EOS_Platform_RTCOptions RtcOptions = { 0 };
	RtcOptions.ApiVersion = 2;
	UE_EOS_CHECK_API_MISMATCH(EOS_PLATFORM_RTCOPTIONS_API_LATEST, 2);
	RtcOptions.PlatformSpecificOptions = nullptr;

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Public/EOSSettings.h:69

Scope: file

Source code excerpt:

	FEOSSettings();

	FString CacheDir;
	FString DefaultArtifactName;
	FString SteamTokenType;
	EOS_ERTCBackgroundMode RTCBackgroundMode;
	int32 TickBudgetInMilliseconds;
	int32 TitleStorageReadChunkLength;
	bool bEnableOverlay;

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Public/EOSSettings.h:100

Scope (from outer to inner):

file
function     class ONLINESUBSYSTEMEOS_API UEOSSettings : public URuntimeOptionsBase { GENERATED_BODY

Source code excerpt:

	 * The directory any PDS/TDS files are cached into. This is per artifact e.g.:
	 *
	 * <UserDir>/<ArtifactId>/<CacheDir>
	 */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="EOS Settings")
	FString CacheDir = TEXT("CacheDir");

	/** Used when launched from a store other than EGS or when the specified artifact name was not present */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="EOS Settings")
	FString DefaultArtifactName;

	/** The preferred background mode to be used by RTC services */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="EOS Settings")

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Private/HTTPChunkInstaller.cpp:1555

Scope (from outer to inner):

file
function     bool FHTTPChunkInstall::AddDataToFileCache

Source code excerpt:

	}
	UE_LOG(LogHTTPChunkInstaller, Log, TEXT("Adding data hash %s to file cache"), *ManifestHash);
	return FFileHelper::SaveArrayToFile(Data, *FPaths::Combine(*CacheDir, *ManifestHash));
}

bool FHTTPChunkInstall::IsDataInFileCache(const FString& ManifestHash)
{
	if(ManifestHash.IsEmpty())
	{

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Private/HTTPChunkInstaller.cpp:1565

Scope (from outer to inner):

file
function     bool FHTTPChunkInstall::IsDataInFileCache

Source code excerpt:

	}
	IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
	return PlatformFile.FileExists(*FPaths::Combine(*CacheDir, *ManifestHash));
}

bool FHTTPChunkInstall::GetDataFromFileCache(const FString& ManifestHash, TArray<uint8>& Data)
{
	if(ManifestHash.IsEmpty())
	{

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Private/HTTPChunkInstaller.cpp:1575

Scope (from outer to inner):

file
function     bool FHTTPChunkInstall::GetDataFromFileCache

Source code excerpt:

	}
	UE_LOG(LogHTTPChunkInstaller, Log, TEXT("Reading data hash %s from file cache"), *ManifestHash);
	return FFileHelper::LoadFileToArray(Data, *FPaths::Combine(*CacheDir, *ManifestHash));
}

bool FHTTPChunkInstall::RemoveDataFromFileCache(const FString& ManifestHash)
{
	if(ManifestHash.IsEmpty())
	{

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Private/HTTPChunkInstaller.cpp:1586

Scope (from outer to inner):

file
function     bool FHTTPChunkInstall::RemoveDataFromFileCache

Source code excerpt:

	UE_LOG(LogHTTPChunkInstaller, Log, TEXT("Removing data hash %s from file cache"), *ManifestHash);
	IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
	auto ManifestPath = FPaths::Combine(*CacheDir, *ManifestHash);
	if (PlatformFile.FileExists(*ManifestPath))
	{
		return PlatformFile.DeleteFile(*ManifestPath);
	}
	return false;
}

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Private/HTTPChunkInstaller.cpp:1631

Scope (from outer to inner):

file
function     void FHTTPChunkInstall::InitialiseSystem

Source code excerpt:

	InstallDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Installed")); // By default this should match ContentDir
	BackupDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Backup"));
	CacheDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Cache"));
	HoldingDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Hold"));
	ContentDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Installed")); // By default this should match InstallDir

	FString TmpString1;
	FString TmpString2;
	if (GConfig->GetString(TEXT("HTTPChunkInstall"), TEXT("CloudDirectory"), TmpString1, GEngineIni))

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Public/HTTPChunkInstaller.h:148

Scope (from outer to inner):

file
class        class FHTTPChunkInstall : public FGenericPlatformChunkInstall, public FTSTickerObjectBase

Source code excerpt:

	FString														BackupDir;
	FString														ContentDir;
	FString														CacheDir;
	FString														HoldingDir;
	IBuildPatchServicesModule*									BPSModule;
	uint32														InstallingChunkID;
	ChunkInstallState											InstallerState;
	EChunkInstallSpeed::Type									InstallSpeed;
	bool														bFirstRun;

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/S3CacheStore.cpp:250

Scope (from outer to inner):

file
namespace    UE::DerivedData
class        class FS3CacheStore final : public ILegacyCacheStore

Source code excerpt:

	FString Region;
	FString CanaryObjectKey;
	FString CacheDir;

	ICacheStoreOwner& StoreOwner;
	ICacheStoreStats* StoreStats = nullptr;

	TArray<FBundle> Bundles;
	TUniquePtr<FRequestPool> RequestPool;

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/S3CacheStore.cpp:908

Scope (from outer to inner):

file
namespace    UE::DerivedData
function     FS3CacheStore::FS3CacheStore

Source code excerpt:

	, Region(InRegion)
	, CanaryObjectKey(InCanaryObjectKey)
	, CacheDir(InCachePath)
	, StoreOwner(InOwner)
	, bEnabled(false)
{
	FRootManifest RootManifest;
	if (RootManifest.Load(InRootManifestPath))
	{

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/S3CacheStore.cpp:966

Scope (from outer to inner):

file
namespace    UE::DerivedData
function     FS3CacheStore::FS3CacheStore

Source code excerpt:

				for (FBundle& Bundle : Bundles)
				{
					Bundle.LocalFile = CacheDir / Bundle.Name;
				}

				// Remove any bundles that are no longer required
				RemoveUnusedBundles();

				// Create a critical section used for updating download state

#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/S3CacheStore.cpp:1130

Scope (from outer to inner):

file
namespace    UE::DerivedData
function     void FS3CacheStore::RemoveUnusedBundles

Source code excerpt:

	// Find all the files on disk
	TArray<FString> Files;
	FileManager.FindFiles(Files, *CacheDir);

	// Remove anything left over
	for (const FString& File : Files)
	{
		if (!KeepFiles.Contains(File))
		{
			FileManager.Delete(*(CacheDir / File));
		}
	}
}

void FS3CacheStore::ReadBundle(FBundle& Bundle)
{

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IOS/IOSPlatformCrashContext.cpp:423

Scope (from outer to inner):

file
function     FString FIOSApplicationInfo::TemporaryCrashReportFolder

Source code excerpt:

		
		NSArray* Paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
		NSString* CacheDir = [Paths objectAtIndex: 0];
		
		NSString* BundleID = [[NSBundle mainBundle] bundleIdentifier];
		if (!BundleID)
		{
			BundleID = [[NSProcessInfo processInfo] processName];
		}
		check(BundleID);
		
		NSString* PLCrashReportFolderPath = [CacheDir stringByAppendingPathComponent: BundleID];
		PLCrashReportFolder = FString(PLCrashReportFolderPath);
	}
	return PLCrashReportFolder;
}
    
FString FIOSApplicationInfo::TemporaryCrashReportName()

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Mac/MacPlatformMisc.cpp:471

Scope (from outer to inner):

file
function     static FString TemporaryCrashReportFolder

Source code excerpt:

			
			NSArray* Paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
			NSString* CacheDir = [Paths objectAtIndex: 0];
			
			NSString* BundleID = [[NSBundle mainBundle] bundleIdentifier];
			if(!BundleID)
			{
				BundleID = [[NSProcessInfo processInfo] processName];
			}
			check(BundleID);
			
			NSString* PLCrashReportFolderPath = [CacheDir stringByAppendingPathComponent: BundleID];
			PLCrashReportFolder = FString(PLCrashReportFolderPath);
		}
		return PLCrashReportFolder;
	}
	
	static FString TemporaryCrashReportName()

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/IoStoreOnDemand.cpp:2504

Scope (from outer to inner):

file
namespace    UE::IO::IAS
function     void FIoStoreOnDemandModule::InitializeInternal

Source code excerpt:

		if (FPaths::HasProjectPersistentDownloadDir())
		{
			FString CacheDir = FPaths::ProjectPersistentDownloadDir();
			Cache = MakeIasCache(*CacheDir, CacheConfig);
		}
	}
	if (!Cache.IsValid())
	{
		UE_LOG(LogIas, Log, TEXT("File cache disabled - streaming only (%s)"),
			(CacheConfig.DiskQuota > 0) ? TEXT("init-fail") : TEXT("zero-quota"));

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/JournaledCache.cpp:2951

Scope (from outer to inner):

file
namespace    UE::IO::IAS
namespace    IasJournaledFileCacheTest
function     void Tests

Source code excerpt:


////////////////////////////////////////////////////////////////////////////////
IOSTOREONDEMAND_API void Tests(const TCHAR* CacheDir=nullptr)
{
	FSupport Support(CacheDir);
	MiscTests(Support);
	MemCacheTests(Support);
	CacheTests(Support);
	BigCache(Support);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/PipelineFileCache.cpp:3196

Scope (from outer to inner):

file
function     void FPipelineFileCacheManager::ClearOSPipelineCache

Source code excerpt:

			{
				FTimespan ExecutableTime(0, 0, FileInfo.st_atime);
				FString CacheDir = FString([NSString stringWithFormat:@"%@/../C/%@/com.apple.metal", NSTemporaryDirectory(), [NSBundle mainBundle].bundleIdentifier]);
				TArray<FString> FoundFiles;
				IPlatformFile::GetPlatformPhysical().FindFilesRecursively(FoundFiles, *CacheDir, TEXT(".data"));

				// Find functions.data file in cache subfolders. If it's older than the executable, delete the whole cache.
				bool bIsCacheOutdated = false;
				for (FString& DataFile : FoundFiles)
				{
					if (FPaths::GetCleanFilename(DataFile) == TEXT("functions.data") && stat(TCHAR_TO_UTF8(*DataFile), &FileInfo) != -1)

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/PipelineFileCache.cpp:3216

Scope (from outer to inner):

file
function     void FPipelineFileCacheManager::ClearOSPipelineCache

Source code excerpt:

				if (bIsCacheOutdated)
				{
					IPlatformFile::GetPlatformPhysical().DeleteDirectoryRecursively(*CacheDir);
				}
			}
		}
#endif
	}
}