diff options
author | Tom | 2011-01-26 17:06:17 -0800 |
---|---|---|
committer | Tom | 2011-01-26 17:06:17 -0800 |
commit | 31fb448cfc9c43532c38a58fff75fb6c0e67d632 (patch) | |
tree | 12d0eb44be349690a7f5ceab3e4e7784b4c0b221 /OpenSim/Region | |
parent | Add a "useCached" parameter to GetUserAccount. Add a function to Scene to get... (diff) | |
download | opensim-SC-31fb448cfc9c43532c38a58fff75fb6c0e67d632.zip opensim-SC-31fb448cfc9c43532c38a58fff75fb6c0e67d632.tar.gz opensim-SC-31fb448cfc9c43532c38a58fff75fb6c0e67d632.tar.bz2 opensim-SC-31fb448cfc9c43532c38a58fff75fb6c0e67d632.tar.xz |
Mostly revert the last commit with the aim of searching for a better solution
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 |
2 files changed, 5 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 54340e6..9ecbcc6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | |||
@@ -142,19 +142,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
142 | 142 | ||
143 | public UserAccount GetUserAccount(UUID scopeID, UUID userID) | 143 | public UserAccount GetUserAccount(UUID scopeID, UUID userID) |
144 | { | 144 | { |
145 | return GetUserAccount(scopeID, userID, true); | 145 | bool inCache = false; |
146 | } | 146 | UserAccount account = m_Cache.Get(userID, out inCache); |
147 | 147 | if (inCache) | |
148 | public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache) | 148 | return account; |
149 | { | ||
150 | UserAccount account; | ||
151 | if (useCache) | ||
152 | { | ||
153 | bool inCache = false; | ||
154 | account = m_Cache.Get(userID, out inCache); | ||
155 | if (inCache) | ||
156 | return account; | ||
157 | } | ||
158 | 149 | ||
159 | account = m_UserService.GetUserAccount(scopeID, userID); | 150 | account = m_UserService.GetUserAccount(scopeID, userID); |
160 | m_Cache.Cache(userID, account); | 151 | m_Cache.Cache(userID, account); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 99248c1..236e9c1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2559,7 +2559,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2559 | else | 2559 | else |
2560 | { | 2560 | { |
2561 | */ | 2561 | */ |
2562 | UserAccount uac = UserAccountService.GetUserAccount(RegionInfo.ScopeID, user, false); | 2562 | UserAccount uac = UserAccountService.GetUserAccount(RegionInfo.ScopeID, user); |
2563 | return uac.UserFlags; | 2563 | return uac.UserFlags; |
2564 | //} | 2564 | //} |
2565 | } | 2565 | } |