Mostly revert the last commit with the aim of searching for a better solution

avinationmerge
Tom 2011-01-26 17:06:17 -08:00
parent 6b27587bc7
commit 31fb448cfc
7 changed files with 5 additions and 35 deletions

View File

@ -142,19 +142,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
public UserAccount GetUserAccount(UUID scopeID, UUID userID) public UserAccount GetUserAccount(UUID scopeID, UUID userID)
{ {
return GetUserAccount(scopeID, userID, true); bool inCache = false;
} UserAccount account = m_Cache.Get(userID, out inCache);
if (inCache)
public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache) return account;
{
UserAccount account;
if (useCache)
{
bool inCache = false;
account = m_Cache.Get(userID, out inCache);
if (inCache)
return account;
}
account = m_UserService.GetUserAccount(scopeID, userID); account = m_UserService.GetUserAccount(scopeID, userID);
m_Cache.Cache(userID, account); m_Cache.Cache(userID, account);

View File

@ -2559,7 +2559,7 @@ namespace OpenSim.Region.Framework.Scenes
else else
{ {
*/ */
UserAccount uac = UserAccountService.GetUserAccount(RegionInfo.ScopeID, user, false); UserAccount uac = UserAccountService.GetUserAccount(RegionInfo.ScopeID, user);
return uac.UserFlags; return uac.UserFlags;
//} //}
} }

View File

@ -130,11 +130,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
} }
public UserAccount GetUserAccount(UUID scopeID, UUID userID) public UserAccount GetUserAccount(UUID scopeID, UUID userID)
{
return GetUserAccount(scopeID, userID, true);
}
public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
{ {
// Cache check // Cache check
UserAccount account; UserAccount account;

View File

@ -112,11 +112,6 @@ namespace OpenSim.Services.Connectors
} }
public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID) public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID)
{
return GetUserAccount(scopeID, userID, true);
}
public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
{ {
//m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUserAccount {0}", userID); //m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUserAccount {0}", userID);
Dictionary<string, object> sendData = new Dictionary<string, object>(); Dictionary<string, object> sendData = new Dictionary<string, object>();

View File

@ -80,11 +80,6 @@ namespace OpenSim.Services.HypergridService
return GetUser(userID.ToString()); return GetUser(userID.ToString());
} }
public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
{
return GetUser(userID.ToString());
}
public UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName) public UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName)
{ {
return null; return null;

View File

@ -143,7 +143,6 @@ namespace OpenSim.Services.Interfaces
public interface IUserAccountService public interface IUserAccountService
{ {
UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache);
UserAccount GetUserAccount(UUID scopeID, UUID userID); UserAccount GetUserAccount(UUID scopeID, UUID userID);
UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName); UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName);
UserAccount GetUserAccount(UUID scopeID, string Email); UserAccount GetUserAccount(UUID scopeID, string Email);

View File

@ -207,11 +207,6 @@ namespace OpenSim.Services.UserAccountService
} }
public UserAccount GetUserAccount(UUID scopeID, UUID principalID) public UserAccount GetUserAccount(UUID scopeID, UUID principalID)
{
return GetUserAccount(scopeID, principalID, true);
}
public UserAccount GetUserAccount(UUID scopeID, UUID principalID, bool useCache)
{ {
UserAccountData[] d; UserAccountData[] d;