Add a Find(Predicate) method to the cache to look for items by data

other than LLUUID.
0.6.0-stable
Melanie Thielker 2008-08-13 14:34:33 +00:00
parent bf363c0ded
commit dd1fc5e3fe
1 changed files with 11 additions and 0 deletions

View File

@ -354,6 +354,17 @@ namespace Opensim.Framework
return data;
}
// Find an object in cache by delegate.
//
public Object Find(Predicate<Opensim.Framework.CacheItemBase> d)
{
CacheItemBase item = m_Index.Find(d);
if(item == null)
return null;
return item.Retrieve();
}
public virtual void Store(LLUUID index, Object data)
{