GetUserAccounts cannot cache null accounts

melanie
UbitUmarov 2016-11-10 23:14:08 +00:00
parent 58b7be48a9
commit 56a79a252c
3 changed files with 13 additions and 5 deletions

View File

@ -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;
}

View File

@ -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);
}
}
}
}

View File

@ -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(