GetUserAccounts cannot cache null accounts
parent
58b7be48a9
commit
56a79a252c
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue