mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Connect up the new asset cache and introduce an asynchronous call path
for asset retrieval (full asset only) to ease migration to the new system
This commit is contained in:
@@ -94,6 +94,20 @@ namespace OpenSim.Services.AssetService
|
||||
return asset.Data;
|
||||
}
|
||||
|
||||
public bool Get(string id, Object sender, AssetRetrieved handler)
|
||||
{
|
||||
UUID assetID;
|
||||
|
||||
if (!UUID.TryParse(id, out assetID))
|
||||
return false;
|
||||
|
||||
AssetBase asset = m_Database.FetchAsset(assetID);
|
||||
|
||||
handler(id, sender, asset);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public string Store(AssetBase asset)
|
||||
{
|
||||
m_Database.CreateAsset(asset);
|
||||
|
||||
Reference in New Issue
Block a user