mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
in some cases store a hg asset on local grid is just waste
This commit is contained in:
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
||||
return asset;
|
||||
}
|
||||
|
||||
public AssetBase Get(string id, string ForeignAssetService)
|
||||
public AssetBase Get(string id, string ForeignAssetService, bool dummy)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool Get(string id, Object sender, AssetRetrieved handler)
|
||||
public bool Get(string id, object sender, AssetRetrieved handler)
|
||||
{
|
||||
// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id);
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
||||
{
|
||||
if (m_HGConnector == null || string.IsNullOrEmpty(ForeignAssetService))
|
||||
return null;
|
||||
return m_HGConnector.Get(id , ForeignAssetService);
|
||||
return m_HGConnector.Get(id , ForeignAssetService, true);
|
||||
}
|
||||
|
||||
public AssetBase GetForeign(string id)
|
||||
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
||||
return asset;
|
||||
}
|
||||
|
||||
public AssetBase Get(string id, string ForeignAssetService)
|
||||
public AssetBase Get(string id, string ForeignAssetService, bool StoreOnLocalGrid)
|
||||
{
|
||||
// assumes id and ForeignAssetService are valid and resolved
|
||||
AssetBase asset = null;
|
||||
@@ -311,7 +311,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
||||
m_Cache.CacheNegative(id);
|
||||
return null;
|
||||
}
|
||||
Store(asset);
|
||||
if(StoreOnLocalGrid)
|
||||
Store(asset);
|
||||
else if (m_Cache != null)
|
||||
m_Cache.Cache(asset);
|
||||
}
|
||||
else if (m_Cache != null)
|
||||
m_Cache.CacheNegative(id);
|
||||
|
||||
Reference in New Issue
Block a user