diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Cache.cs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs index 7ccc320..3ca85d7 100644 --- a/OpenSim/Framework/Cache.cs +++ b/OpenSim/Framework/Cache.cs | |||
@@ -390,17 +390,21 @@ namespace OpenSim.Framework | |||
390 | 390 | ||
391 | Object data = fetch(index); | 391 | Object data = fetch(index); |
392 | 392 | ||
393 | if (data == null && (m_Flags & CacheFlags.CacheMissing) == 0) | 393 | if (data == null) |
394 | return null; | ||
395 | |||
396 | lock (m_Index) | ||
397 | { | 394 | { |
398 | CacheItemBase missing = new CacheItemBase(index); | 395 | if((m_Flags & CacheFlags.CacheMissing) != 0) |
399 | if (!m_Index.Contains(missing)) | 396 | { |
400 | { | 397 | lock (m_Index) |
401 | m_Index.Add(missing); | 398 | { |
402 | m_Lookup[index] = missing; | 399 | CacheItemBase missing = new CacheItemBase(index); |
403 | } | 400 | if (!m_Index.Contains(missing)) |
401 | { | ||
402 | m_Index.Add(missing); | ||
403 | m_Lookup[index] = missing; | ||
404 | } | ||
405 | } | ||
406 | } | ||
407 | return null; | ||
404 | } | 408 | } |
405 | 409 | ||
406 | Store(index, data); | 410 | Store(index, data); |