From d9e4389749238d498214fc3239546eb8736d64dc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 24 Dec 2024 00:25:10 +0000 Subject: [PATCH] add flotsam comand fcache clearnegatives --- .../Region/CoreModules/Asset/FlotsamAssetCache.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 13ef265e2b..953cc0f1e6 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -215,6 +215,7 @@ namespace OpenSim.Region.CoreModules.Asset MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache status", "fcache status", "Display cache status", HandleConsoleCommand); MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache clear", "fcache clear [file] [memory]", "Remove all assets in the cache. If file or memory is specified then only this cache is cleared.", HandleConsoleCommand); + MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache clearnegatives", "fcache clearnegatives", "Remove cache of assets previously not found in services.", HandleConsoleCommand); MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache assets", "fcache assets", "Attempt a deep scan and cache of all assets in all scenes", HandleConsoleCommand); MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache expire", "fcache expire ", "Purge cached assets older than the specified date/time", HandleConsoleCommand); if (!string.IsNullOrWhiteSpace(m_assetLoader)) @@ -1438,7 +1439,19 @@ namespace OpenSim.Region.CoreModules.Asset con.Output("File cache not enabled."); } } + if(m_negativeCacheEnabled) + m_negativeCache.Clear(); + break; + case "clearnegatives": + if(m_negativeCacheEnabled) + { + int nsz = m_negativeCache.Count; + m_negativeCache.Clear(); + con.Output($"Flotsam cache of negatives cleared ({nsz} entries)"); + } + else + con.Output("Flotsam cache of negatives not enabled"); break; case "assets":