From 22c7450363b8873bdc76ad26cd22a6cd25bfd78f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 29 Aug 2017 07:38:52 +0100 Subject: [PATCH] fix cache.cs (used on parcels info) --- OpenSim/Framework/Cache.cs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs index 7ccc320acd..3ca85d7d1a 100644 --- a/OpenSim/Framework/Cache.cs +++ b/OpenSim/Framework/Cache.cs @@ -390,17 +390,21 @@ namespace OpenSim.Framework Object data = fetch(index); - if (data == null && (m_Flags & CacheFlags.CacheMissing) == 0) - return null; - - lock (m_Index) + if (data == null) { - CacheItemBase missing = new CacheItemBase(index); - if (!m_Index.Contains(missing)) - { - m_Index.Add(missing); - m_Lookup[index] = missing; - } + if((m_Flags & CacheFlags.CacheMissing) != 0) + { + lock (m_Index) + { + CacheItemBase missing = new CacheItemBase(index); + if (!m_Index.Contains(missing)) + { + m_Index.Add(missing); + m_Lookup[index] = missing; + } + } + } + return null; } Store(index, data);