/Engine/Source/Runtime/Engine/Classes/Engine/Texture.h
InFlags are ETextureCacheFlags. InSettingsPerLayerFetchFirst can be nullptr - if not, then the caceh will check if the corresponding texture exists in the DDC before trying the FetchOrBuild settings. FetchFirst is ignored if forcerebuild is passed as a flag. InSettingsPerLayerFetchOrBuild is required. If a texture matching the settings exists in the ddc, it is used, otherwise it is built.
void Cache ( class [UTexture](API\Runtime\Engine\Engine\UTexture) & InTexture, const struct [FTextureBuildSettings](API\Developer\TextureCompressor\FTextureBuildSettings) * InSettingsPerLayerFetchFirst, const struct [FTextureBuildSettings](API\Developer\TextureCompressor\FTextureBuildSettings) * InSettingsPerLayerFetchOrBuild, const [FTexturePlatformData::FTextureEncodeResultMetadata](API\Runtime\Engine\Engine\FTexturePlatformData\FTextureEncodeResultMetadata) * OutResultMetadataPerLayerFetchFirst, const [FTexturePlatformData::FTextureEncodeResultMetadata](API\Runtime\Engine\Engine\FTexturePlatformData\FTextureEncodeResultMetadata) * OutResultMetadataPerLayerFetchOrBuild, uint32 InFlags, class [ITextureCompressorModule](API\Developer\TextureCompressor\ITextureCompressorModule) * Compressor )