diff options
author | Justin Clark-Casey (justincc) | 2010-03-12 17:58:25 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-03-12 17:58:25 +0000 |
commit | db61d66e746df4b1919b031de72bee7cf3a796f3 (patch) | |
tree | 770a8101a52222f87f298de79fabbd4aad176333 /OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | |
parent | minor: add some more documentation for IHttpServer.AddHTTPHandler() to tell t... (diff) | |
parent | Changed some properties and methods from private to protected in LLLoginRespo... (diff) | |
download | opensim-SC_OLD-db61d66e746df4b1919b031de72bee7cf3a796f3.zip opensim-SC_OLD-db61d66e746df4b1919b031de72bee7cf3a796f3.tar.gz opensim-SC_OLD-db61d66e746df4b1919b031de72bee7cf3a796f3.tar.bz2 opensim-SC_OLD-db61d66e746df4b1919b031de72bee7cf3a796f3.tar.xz |
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 07fee79..ce0ca40 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | |||
@@ -142,26 +142,27 @@ 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 | UserAccount account = m_Cache.Get(userID); | 145 | bool inCache = false; |
146 | if (account != null) | 146 | UserAccount account = m_Cache.Get(userID, out inCache); |
147 | if (inCache) | ||
147 | return account; | 148 | return account; |
148 | 149 | ||
149 | account = m_UserService.GetUserAccount(scopeID, userID); | 150 | account = m_UserService.GetUserAccount(scopeID, userID); |
150 | if (account != null) | 151 | m_Cache.Cache(userID, account); |
151 | m_Cache.Cache(account); | ||
152 | 152 | ||
153 | return account; | 153 | return account; |
154 | } | 154 | } |
155 | 155 | ||
156 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) | 156 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) |
157 | { | 157 | { |
158 | UserAccount account = m_Cache.Get(firstName + " " + lastName); | 158 | bool inCache = false; |
159 | if (account != null) | 159 | UserAccount account = m_Cache.Get(firstName + " " + lastName, out inCache); |
160 | if (inCache) | ||
160 | return account; | 161 | return account; |
161 | 162 | ||
162 | account = m_UserService.GetUserAccount(scopeID, firstName, lastName); | 163 | account = m_UserService.GetUserAccount(scopeID, firstName, lastName); |
163 | if (account != null) | 164 | if (account != null) |
164 | m_Cache.Cache(account); | 165 | m_Cache.Cache(account.PrincipalID, account); |
165 | 166 | ||
166 | return account; | 167 | return account; |
167 | } | 168 | } |