Expose batch cache invalidation to mods
Entoarox opened this issue ยท 3 comments
Right now, mods can only invalidate files one at a time, this not only is cumbersome, but is bloating the log file extensively for mods like XnbLoader where a lot of files might need invalidation
@Entoarox Would this overload work for you?
/// <summary>Remove matching assets from the content cache so they're reloaded on the next request. This will reload core game assets if needed, but references to the former asset will still show the previous content.</summary>
/// <param name="predicate">Matches the assets to invalidate.</param>
/// <returns>Returns whether any cache entries were invalidated.</returns>
bool InvalidateCache(Func<IAssetInfo, bool> predicate);