diff options
author | UbitUmarov | 2017-08-29 07:53:34 +0100 |
---|---|---|
committer | UbitUmarov | 2017-08-29 07:53:34 +0100 |
commit | d4a3aa5e084beb6514573c8b5b88f55099e4f2f0 (patch) | |
tree | 09c41b9222c6ffc34eb879c310914a185d9a0c7c | |
parent | update httpserver (diff) | |
parent | fix cache.cs (used on parcels info) (diff) | |
download | opensim-SC-d4a3aa5e084beb6514573c8b5b88f55099e4f2f0.zip opensim-SC-d4a3aa5e084beb6514573c8b5b88f55099e4f2f0.tar.gz opensim-SC-d4a3aa5e084beb6514573c8b5b88f55099e4f2f0.tar.bz2 opensim-SC-d4a3aa5e084beb6514573c8b5b88f55099e4f2f0.tar.xz |
Merge branch 'master' into httptests
-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); |