summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentManagers/IContentManager.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-02-21 13:45:10 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-02-21 13:45:10 -0500
commit79aee3fba7a43025d84527f883ce6715d7140302 (patch)
tree65cd94fb65c0d79a7fd94754eeccf6eba33373fe /src/SMAPI/Framework/ContentManagers/IContentManager.cs
parent50d7e95920e1963af583f398055c6e8ad5df1033 (diff)
downloadSMAPI-79aee3fba7a43025d84527f883ce6715d7140302.tar.gz
SMAPI-79aee3fba7a43025d84527f883ce6715d7140302.tar.bz2
SMAPI-79aee3fba7a43025d84527f883ce6715d7140302.zip
reduce performance impact of new cache fix
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers/IContentManager.cs')
-rw-r--r--src/SMAPI/Framework/ContentManagers/IContentManager.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/IContentManager.cs b/src/SMAPI/Framework/ContentManagers/IContentManager.cs
index 0e7edd8f..1e222472 100644
--- a/src/SMAPI/Framework/ContentManagers/IContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/IContentManager.cs
@@ -36,9 +36,6 @@ namespace StardewModdingAPI.Framework.ContentManagers
/// <param name="useCache">Whether to read/write the loaded asset to the asset cache.</param>
T Load<T>(string assetName, LocalizedContentManager.LanguageCode language, bool useCache);
- /// <summary>Perform any cleanup needed when the locale changes.</summary>
- void OnLocaleChanged();
-
/// <summary>Normalize path separators in a file path. For asset keys, see <see cref="AssertAndNormalizeAssetName"/> instead.</summary>
/// <param name="path">The file path to normalize.</param>
[Pure]
@@ -69,5 +66,12 @@ namespace StardewModdingAPI.Framework.ContentManagers
/// <param name="dispose">Whether to dispose invalidated assets. This should only be <c>true</c> when they're being invalidated as part of a dispose, to avoid crashing the game.</param>
/// <returns>Returns the invalidated asset names and instances.</returns>
IDictionary<string, object> InvalidateCache(Func<string, Type, bool> predicate, bool dispose = false);
+
+ /// <summary>Perform any cleanup needed when the locale changes.</summary>
+ void OnLocaleChanged();
+
+ /// <summary>Clean up when the player is returning to the title screen.</summary>
+ /// <remarks>This is called after the player returns to the title screen, but before <see cref="Game1.CleanupReturningToTitle"/> runs.</remarks>
+ void OnReturningToTitleScreen();
}
}