aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorSean Dague2008-06-30 15:05:30 +0000
committerSean Dague2008-06-30 15:05:30 +0000
commit721988adcd5a38607cb0ff5495f2984e7efb9761 (patch)
tree1f69931d87bb097014c4ef901436871cd0f85df6 /OpenSim/Framework/Communications
parentMantis#1637. Thank you kindly, Melanie for a patch that: (diff)
downloadopensim-SC_OLD-721988adcd5a38607cb0ff5495f2984e7efb9761.zip
opensim-SC_OLD-721988adcd5a38607cb0ff5495f2984e7efb9761.tar.gz
opensim-SC_OLD-721988adcd5a38607cb0ff5495f2984e7efb9761.tar.bz2
opensim-SC_OLD-721988adcd5a38607cb0ff5495f2984e7efb9761.tar.xz
add the ability to cherry pick expire something from the asset
cache. Bandaid until we rethink the caches a bit more.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs24
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 {