From 9bd9a38be9d045e874db60eb003ff84333c7d6de Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 9 Aug 2021 14:51:22 +0100 Subject: [PATCH] flotsam cache: and fache expire now should expire everything not detected as in use --- .../CoreModules/Asset/FlotsamAssetCache.cs | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 0e294dbe74..2313903e6c 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -1552,16 +1552,22 @@ namespace OpenSim.Region.CoreModules.Asset { s_expirationDate = cmdparams[2]; } - - if (!DateTime.TryParse(s_expirationDate, out expirationDate)) + if(s_expirationDate.Equals("now", StringComparison.InvariantCultureIgnoreCase)) + expirationDate = DateTime.Now; + else { - con.Output("{0} is not a valid date & time", cmd); - break; - } - if (expirationDate >= DateTime.Now) - { - con.Output("{0} date & time must be in past", cmd); - break; + if (!DateTime.TryParse(s_expirationDate, out expirationDate)) + { + con.Output("{0} is not a valid date & time", cmd); + m_cleanupRunning = false; + break; + } + if (expirationDate >= DateTime.Now) + { + con.Output("{0} date & time must be in past", cmd); + m_cleanupRunning = false; + break; + } } if (m_FileCacheEnabled) {