diff options
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 2c51160..95af28b 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -382,6 +382,30 @@ namespace OpenSim.Framework.Communications.Cache | |||
382 | } | 382 | } |
383 | } | 383 | } |
384 | 384 | ||
385 | /// <summary> | ||
386 | /// Allows you to clear a specific asset by uuid out | ||
387 | /// of the asset cache. This is needed because the osdynamic | ||
388 | /// texture code grows the asset cache without bounds. The | ||
389 | /// real solution here is a much better cache archicture, but | ||
390 | /// this is a stop gap measure until we have such a thing. | ||
391 | /// </summary> | ||
392 | |||
393 | public void ExpireAsset(LLUUID uuid) | ||
394 | { | ||
395 | // uuid is unique, so no need to worry about it showing up | ||
396 | // in the 2 caches differently. Also, locks are probably | ||
397 | // needed in all of this, or move to synchronized non | ||
398 | // generic forms for Dictionaries. | ||
399 | if (Textures.ContainsKey(uuid)) | ||
400 | { | ||
401 | Textures.Remove(uuid); | ||
402 | } | ||
403 | else if (Assets.ContainsKey(uuid)) | ||
404 | { | ||
405 | Assets.Remove(uuid); | ||
406 | } | ||
407 | } | ||
408 | |||
385 | // See IAssetReceiver | 409 | // See IAssetReceiver |
386 | public void AssetReceived(AssetBase asset, bool IsTexture) | 410 | public void AssetReceived(AssetBase asset, bool IsTexture) |
387 | { | 411 | { |