From 5d6a42a22e7c331551118cea0fc64e3347f83a9c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 17 Aug 2008 19:10:32 +0000 Subject: [PATCH] Add an invalidate method to the cache class. --- OpenSim/Framework/Cache.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs index 4746d3c4b4..bccda24e41 100644 --- a/OpenSim/Framework/Cache.cs +++ b/OpenSim/Framework/Cache.cs @@ -492,5 +492,15 @@ namespace Opensim.Framework break; } } + + public void Invalidate(LLUUID uuid) + { + if(!m_Lookup.ContainsKey(uuid)) + return; + + CacheItemBase item = m_Lookup[uuid]; + m_Lookup.Remove(uuid); + m_Index.Remove(item); + } } }