Interface IContentCache
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
An interface for storing information about the compiled content.
public interface IContentCache
Methods
CleanCache(ContentBuilder)
Clears out any unused content files from the cache and the disk.
void CleanCache(ContentBuilder builder)
Parameters
builderContentBuilderA ContentBuilder that the cache file is related to.
FlushCache(ContentBuilder)
Saves any pending content cache information to disk for the specified builder.
void FlushCache(ContentBuilder builder)
Parameters
builderContentBuilderA ContentBuilder that the cache file is related to.
LoadCache(ContentBuilder)
Loads the content cache for the specified builder.
void LoadCache(ContentBuilder builder)
Parameters
builderContentBuilderA ContentBuilder that the cache file is related to.
ReadContentFileCache(ContentBuilder, string, string, bool, IContentImporter?, IContentProcessor?)
Reads (from memory or disk) cached information about the content file and returns it if its valid.
ContentFileCache? ReadContentFileCache(ContentBuilder builder, string relativePath, string contentRoot, bool shouldBuild = false, IContentImporter? importer = null, IContentProcessor? processor = null)
Parameters
builderContentBuilderA ContentBuilder that the cache file is related to.
relativePathstringA relative path to the content file.
contentRootstringA relative path that is added as prefix to the output.
shouldBuildboolIf the content file will be built or copied.
importerIContentImporterAn IContentImporter the content file will be passed through.
processorIContentProcessorAn IContentProcessor the content file will be passed through.
Returns
- ContentFileCache
An instance of ContentFileCache if valid cached information about the content is found,
nullotherwise.
WriteContentFileCache(ContentBuilder, string, ContentFileCache)
Writes down (to memory or disk) information about the content file.
Do note that FlushCache(ContentBuilder) will always be called before exiting the content builder.
void WriteContentFileCache(ContentBuilder builder, string relativePath, ContentFileCache fileCache)
Parameters
builderContentBuilderA ContentBuilder that the cache file is related to.
relativePathstringA relative path to the content file.
fileCacheContentFileCacheA ContentFileCache containing the information about the source file and compiled content.