Make negative asset caching actually work

Also fixes some merge artefacts in HGAssetBroker where cached assets
were requested but not actually used and completely squelch a materials
debug message because there is nothing the user can do to fix it anyway.
This commit is contained in:
Melanie Thielker
2017-01-30 13:59:05 +00:00
parent a17db1b3cd
commit 5a18ea31cf
13 changed files with 147 additions and 45 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenSim.Framework
/// </summary>
/// <param name='id'></param>
/// <returns>null if the asset does not exist.</returns>
AssetBase Get(string id);
AssetBase Get(string id, out bool negative);
/// <summary>
/// Check whether an asset with the specified id exists in the cache.

View File

@@ -113,7 +113,8 @@ namespace OpenSim.Framework
{
if (dataCache.Check(item.TextureID.ToString()))
{
AssetBase assetItem = dataCache.Get(item.TextureID.ToString());
bool negative;
AssetBase assetItem = dataCache.Get(item.TextureID.ToString(), out negative);
if (assetItem != null)
{
itemmap.Add("assetdata", OSD.FromBinary(assetItem.Data));