Merge branch 'master' into httptests

httptests
UbitUmarov 2017-08-29 07:53:34 +01:00
commit d4a3aa5e08
1 changed files with 14 additions and 10 deletions

View File

@ -390,17 +390,21 @@ namespace OpenSim.Framework
Object data = fetch(index); Object data = fetch(index);
if (data == null && (m_Flags & CacheFlags.CacheMissing) == 0) if (data == null)
return null;
lock (m_Index)
{ {
CacheItemBase missing = new CacheItemBase(index); if((m_Flags & CacheFlags.CacheMissing) != 0)
if (!m_Index.Contains(missing)) {
{ lock (m_Index)
m_Index.Add(missing); {
m_Lookup[index] = missing; CacheItemBase missing = new CacheItemBase(index);
} if (!m_Index.Contains(missing))
{
m_Index.Add(missing);
m_Lookup[index] = missing;
}
}
}
return null;
} }
Store(index, data); Store(index, data);