GetUserAccounts cannot cache null accounts
parent
58b7be48a9
commit
56a79a252c
|
@ -211,10 +211,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
List<UserAccount> ext = UserAccountService.GetUserAccounts(scopeID, missing);
|
List<UserAccount> ext = UserAccountService.GetUserAccounts(scopeID, missing);
|
||||||
if(ext != null && ext.Count > 0)
|
if(ext != null && ext.Count > 0)
|
||||||
{
|
{
|
||||||
ret.AddRange(ext);
|
|
||||||
foreach(UserAccount acc in ext)
|
foreach(UserAccount acc in ext)
|
||||||
|
{
|
||||||
|
if(acc != null)
|
||||||
|
{
|
||||||
|
ret.Add(acc);
|
||||||
m_Cache.Cache(acc.PrincipalID, acc);
|
m_Cache.Cache(acc.PrincipalID, acc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,12 +189,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
if(ext != null && ext.Count >0 )
|
if(ext != null && ext.Count >0 )
|
||||||
{
|
{
|
||||||
foreach(UserAccount acc in ext)
|
foreach(UserAccount acc in ext)
|
||||||
|
{
|
||||||
|
if(acc != null)
|
||||||
{
|
{
|
||||||
accs.Add(acc);
|
accs.Add(acc);
|
||||||
m_Cache.Cache(acc.PrincipalID, acc);
|
m_Cache.Cache(acc.PrincipalID, acc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return accs;
|
return accs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
public class UserAccountCache : IUserAccountCacheModule
|
public class UserAccountCache : IUserAccountCacheModule
|
||||||
{
|
{
|
||||||
private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
|
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 =
|
// private static readonly ILog m_log =
|
||||||
// LogManager.GetLogger(
|
// LogManager.GetLogger(
|
||||||
|
|
Loading…
Reference in New Issue