in some cases store a hg asset on local grid is just waste

This commit is contained in:
UbitUmarov
2020-10-28 12:12:08 +00:00
parent 52c86e543f
commit 7b106564fa
14 changed files with 67 additions and 55 deletions

View File

@@ -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);

View File

@@ -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);