Add a Find(Predicate) method to the cache to look for items by data
other than LLUUID.0.6.0-stable
parent
bf363c0ded
commit
dd1fc5e3fe
|
@ -354,6 +354,17 @@ namespace Opensim.Framework
|
||||||
return data;
|
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)
|
public virtual void Store(LLUUID index, Object data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue