mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
GetUserAccounts cannot cache null accounts
This commit is contained in:
@@ -211,9 +211,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
List<UserAccount> ext = UserAccountService.GetUserAccounts(scopeID, missing);
|
||||
if(ext != null && ext.Count > 0)
|
||||
{
|
||||
ret.AddRange(ext);
|
||||
foreach(UserAccount acc in ext)
|
||||
m_Cache.Cache(acc.PrincipalID, acc);
|
||||
{
|
||||
if(acc != null)
|
||||
{
|
||||
ret.Add(acc);
|
||||
m_Cache.Cache(acc.PrincipalID, acc);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -190,8 +190,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
{
|
||||
foreach(UserAccount acc in ext)
|
||||
{
|
||||
accs.Add(acc);
|
||||
m_Cache.Cache(acc.PrincipalID, acc);
|
||||
if(acc != null)
|
||||
{
|
||||
accs.Add(acc);
|
||||
m_Cache.Cache(acc.PrincipalID, acc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
public class UserAccountCache : IUserAccountCacheModule
|
||||
{
|
||||
private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
|
||||
private const double CACHENULL_EXPIRATION_SECONDS = 600; // 5minutes
|
||||
private const double CACHENULL_EXPIRATION_SECONDS = 600; // 10minutes
|
||||
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
|
||||
Reference in New Issue
Block a user