mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Add a Find(Predicate) method to the cache to look for items by data
other than LLUUID.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user