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
builder
ContentBuilderA 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
builder
ContentBuilderA ContentBuilder that the cache file is related to.
LoadCache(ContentBuilder)
Loads the content cache for the specified builder.
void LoadCache(ContentBuilder builder)
Parameters
builder
ContentBuilderA 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
builder
ContentBuilderA ContentBuilder that the cache file is related to.
relativePath
stringA relative path to the content file.
contentRoot
stringA relative path that is added as prefix to the output.
shouldBuild
boolIf the content file will be built or copied.
importer
IContentImporterAn IContentImporter the content file will be passed through.
processor
IContentProcessorAn IContentProcessor the content file will be passed through.
Returns
- ContentFileCache
An instance of ContentFileCache if valid cached information about the content is found,
null
otherwise.
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
builder
ContentBuilderA ContentBuilder that the cache file is related to.
relativePath
stringA relative path to the content file.
fileCache
ContentFileCacheA ContentFileCache containing the information about the source file and compiled content.