From ed0f8bd5728d0fbe992cc4a1d164983edda654e8 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sat, 22 Dec 2007 16:45:44 +0000
Subject: minor refactor
---
OpenSim/Framework/Communications/Cache/AssetCache.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 99356c2..d1ff9c9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -98,7 +98,12 @@ namespace OpenSim.Framework.Communications.Cache
}
}
- public AssetBase GetAsset(LLUUID assetID)
+ ///
+ /// Only get an asset if we already have it in the cache.
+ ///
+ ///
+ ///
+ private AssetBase GetCachedAsset(LLUUID assetID)
{
AssetBase asset = null;
if (Textures.ContainsKey(assetID))
@@ -153,7 +158,7 @@ namespace OpenSim.Framework.Communications.Cache
public AssetBase GetAsset(LLUUID assetID, bool isTexture)
{
- AssetBase asset = GetAsset(assetID);
+ AssetBase asset = GetCachedAsset(assetID);
if (asset == null)
{
m_assetServer.RequestAsset(assetID, isTexture);
@@ -223,7 +228,7 @@ namespace OpenSim.Framework.Communications.Cache
public AssetBase CopyAsset(LLUUID assetID)
{
- AssetBase asset = GetAsset(assetID);
+ AssetBase asset = GetCachedAsset(assetID);
if (asset == null)
return null;
--
cgit v1.1