From dd1980c24c280a4cc3fc08e0a06ed8c9d0db583c Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 02:58:14 +0100 Subject: [PATCH] Add an interface for a region's user account cache --- .../LocalUserAccountServiceConnector.cs | 1 + .../RemoteUserAccountServiceConnector.cs | 1 + .../UserAccounts/UserAccountCache.cs | 2 +- .../Framework/Interfaces/IUserAccountCacheModule.cs | 13 +++++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 9ecbcc631e..535a63701d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs @@ -120,6 +120,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts return; scene.RegisterModuleInterface(m_UserService); + scene.RegisterModuleInterface(m_Cache); } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index 348ad42713..f6b6aebd9d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -102,6 +102,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts return; scene.RegisterModuleInterface(this); + scene.RegisterModuleInterface(m_Cache); scene.EventManager.OnNewClient += OnNewClient; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index 07c127ecf6..05042f455c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -34,7 +34,7 @@ using log4net; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { - public class UserAccountCache + public class UserAccountCache : IUserAccountCacheModule { private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! diff --git a/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs b/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs new file mode 100644 index 0000000000..d1a4d8eb2d --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs @@ -0,0 +1,13 @@ +/////////////////////////////////////////////////////////////////// +// +// (c) Careminster Limited, Melanie Thielker and the Meta7 Team +// +// This file is not open source. All rights reserved +// + +using OpenSim.Region.Framework.Scenes; + +public interface IUserAccountCacheModule +{ + void Remove(string name); +}