aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index fe25eca..9945829 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -245,15 +245,13 @@ namespace OpenSim.Framework.Communications.Cache
245 /// <summary> 245 /// <summary>
246 /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to 246 /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to
247 /// load it into the cache. 247 /// load it into the cache.
248 /// </summary>
248 /// 249 ///
249 /// XXX We'll keep polling the cache until we get the asset or we exceed 250 /// XXX We'll keep polling the cache until we get the asset or we exceed
250 /// the allowed number of polls. This isn't a very good way of doing things since a single thread 251 /// the allowed number of polls. This isn't a very good way of doing things since a single thread
251 /// is processing inbound packets, so if the asset server is slow, we could block this for up to 252 /// is processing inbound packets, so if the asset server is slow, we could block this for up to
252 /// the timeout period. What we might want to do is register asynchronous callbacks on asset 253 /// the timeout period. Whereever possible we want to use the asynchronous callback GetAsset()
253 /// receipt in the same manner as the TextureDownloadModule. Of course, 254 ///
254 /// a timeout before asset receipt usually isn't fatal, the operation will work on the retry when the
255 /// asset is much more likely to have made it into the cache.
256 /// </summary>
257 /// <param name="assetID"></param> 255 /// <param name="assetID"></param>
258 /// <param name="isTexture"></param> 256 /// <param name="isTexture"></param>
259 /// <returns>null if the asset could not be retrieved</returns> 257 /// <returns>null if the asset could not be retrieved</returns>
@@ -270,6 +268,7 @@ namespace OpenSim.Framework.Communications.Cache
270 { 268 {
271 return asset; 269 return asset;
272 } 270 }
271
273 m_assetServer.RequestAsset(assetID, isTexture); 272 m_assetServer.RequestAsset(assetID, isTexture);
274 273
275 do 274 do
@@ -280,7 +279,8 @@ namespace OpenSim.Framework.Communications.Cache
280 { 279 {
281 return asset; 280 return asset;
282 } 281 }
283 } while (--maxPolls > 0); 282 }
283 while (--maxPolls > 0);
284 284
285 m_log.WarnFormat("[ASSET CACHE]: {0} {1} was not received before the retrieval timeout was reached", 285 m_log.WarnFormat("[ASSET CACHE]: {0} {1} was not received before the retrieval timeout was reached",
286 isTexture ? "texture" : "asset", assetID.ToString()); 286 isTexture ? "texture" : "asset", assetID.ToString());
@@ -400,6 +400,9 @@ namespace OpenSim.Framework.Communications.Cache
400 { 400 {
401// m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); 401// m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
402 402
403 // Remember the fact that this asset could not be found to prevent delays from repeated requests
404 m_memcache.Add(assetID, null, TimeSpan.FromHours(24));
405
403 // Notify requesters for this asset 406 // Notify requesters for this asset
404 AssetRequestsList reqList; 407 AssetRequestsList reqList;
405 lock (RequestLists) 408 lock (RequestLists)