diff options
Diffstat (limited to 'OpenSim')
12 files changed, 75 insertions, 111 deletions
diff --git a/OpenSim/Framework/IAssetCache.cs b/OpenSim/Framework/IAssetCache.cs index 1e6d19d..2df9199 100644 --- a/OpenSim/Framework/IAssetCache.cs +++ b/OpenSim/Framework/IAssetCache.cs | |||
@@ -47,8 +47,9 @@ namespace OpenSim.Framework | |||
47 | /// Get an asset by its id. | 47 | /// Get an asset by its id. |
48 | /// </summary> | 48 | /// </summary> |
49 | /// <param name='id'></param> | 49 | /// <param name='id'></param> |
50 | /// <returns>null if the asset does not exist.</returns> | 50 | /// <param name='asset'>Will be set to null if no asset was found</param> |
51 | AssetBase Get(string id, out bool negative); | 51 | /// <returns>False if the asset has been negative-cached</returns> |
52 | bool Get(string id, out AssetBase asset); | ||
52 | 53 | ||
53 | /// <summary> | 54 | /// <summary> |
54 | /// Check whether an asset with the specified id exists in the cache. | 55 | /// Check whether an asset with the specified id exists in the cache. |
diff --git a/OpenSim/Framework/WearableCacheItem.cs b/OpenSim/Framework/WearableCacheItem.cs index f181c39..427e149 100644 --- a/OpenSim/Framework/WearableCacheItem.cs +++ b/OpenSim/Framework/WearableCacheItem.cs | |||
@@ -113,8 +113,8 @@ namespace OpenSim.Framework | |||
113 | { | 113 | { |
114 | if (dataCache.Check(item.TextureID.ToString())) | 114 | if (dataCache.Check(item.TextureID.ToString())) |
115 | { | 115 | { |
116 | bool negative; | 116 | AssetBase assetItem; |
117 | AssetBase assetItem = dataCache.Get(item.TextureID.ToString(), out negative); | 117 | dataCache.Get(item.TextureID.ToString(), out assetItem); |
118 | if (assetItem != null) | 118 | if (assetItem != null) |
119 | { | 119 | { |
120 | itemmap.Add("assetdata", OSD.FromBinary(assetItem.Data)); | 120 | itemmap.Add("assetdata", OSD.FromBinary(assetItem.Data)); |
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 594b6bb..6e4a710 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -369,8 +369,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
369 | else if (Cache != null) | 369 | else if (Cache != null) |
370 | { | 370 | { |
371 | string assetName = "j2kCache_" + AssetId.ToString(); | 371 | string assetName = "j2kCache_" + AssetId.ToString(); |
372 | bool negative; | 372 | AssetBase layerDecodeAsset; |
373 | AssetBase layerDecodeAsset = Cache.Get(assetName, out negative); | 373 | Cache.Get(assetName, out layerDecodeAsset); |
374 | 374 | ||
375 | if (layerDecodeAsset != null) | 375 | if (layerDecodeAsset != null) |
376 | { | 376 | { |
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index 136134f..403236c 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | |||
@@ -260,12 +260,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
260 | /// Cache doesn't guarantee in any situation that asset is stored to it. | 260 | /// Cache doesn't guarantee in any situation that asset is stored to it. |
261 | /// </para> | 261 | /// </para> |
262 | /// </remarks> | 262 | /// </remarks> |
263 | public AssetBase Get(string id, out bool negative) | 263 | public bool Get(string id, out AssetBase assetBase) |
264 | { | 264 | { |
265 | negative = false; | ||
266 | |||
267 | m_getCount++; | 265 | m_getCount++; |
268 | AssetBase assetBase; | ||
269 | if (m_cache.TryGetValue(id, out assetBase)) | 266 | if (m_cache.TryGetValue(id, out assetBase)) |
270 | m_hitCount++; | 267 | m_hitCount++; |
271 | 268 | ||
@@ -286,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
286 | // if (null == assetBase) | 283 | // if (null == assetBase) |
287 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); | 284 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); |
288 | 285 | ||
289 | return assetBase; | 286 | return true; |
290 | } | 287 | } |
291 | 288 | ||
292 | #endregion | 289 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index d655509..10c0e85 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | |||
@@ -115,8 +115,10 @@ namespace OpenSim.Region.CoreModules.Asset | |||
115 | public bool Check(string id) | 115 | public bool Check(string id) |
116 | { | 116 | { |
117 | // XXX This is probably not an efficient implementation. | 117 | // XXX This is probably not an efficient implementation. |
118 | bool negative; | 118 | AssetBase asset; |
119 | return Get(id, out negative) != null; | 119 | if (!Get(id, out asset)) |
120 | return false; | ||
121 | return asset != null; | ||
120 | } | 122 | } |
121 | 123 | ||
122 | public void Cache(AssetBase asset) | 124 | public void Cache(AssetBase asset) |
@@ -130,10 +132,10 @@ namespace OpenSim.Region.CoreModules.Asset | |||
130 | // We don't do negative caching | 132 | // We don't do negative caching |
131 | } | 133 | } |
132 | 134 | ||
133 | public AssetBase Get(string id, out bool negative) | 135 | public bool Get(string id, out AssetBase asset) |
134 | { | 136 | { |
135 | negative = false; | 137 | asset = (AssetBase)m_Cache.Get(id); |
136 | return (AssetBase)m_Cache.Get(id); | 138 | return true; |
137 | } | 139 | } |
138 | 140 | ||
139 | public void Expire(string id) | 141 | public void Expire(string id) |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index b183a75..f8a4461 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -536,24 +536,23 @@ namespace OpenSim.Region.CoreModules.Asset | |||
536 | // For IAssetService | 536 | // For IAssetService |
537 | public AssetBase Get(string id) | 537 | public AssetBase Get(string id) |
538 | { | 538 | { |
539 | bool negative; | 539 | AssetBase asset; |
540 | return Get(id, out negative); | 540 | Get(id, out asset); |
541 | return asset; | ||
541 | } | 542 | } |
542 | 543 | ||
543 | public AssetBase Get(string id, out bool negative) | 544 | public bool Get(string id, out AssetBase asset) |
544 | { | 545 | { |
545 | negative = false; | 546 | asset = null; |
546 | 547 | ||
547 | m_Requests++; | 548 | m_Requests++; |
548 | 549 | ||
549 | object dummy; | 550 | object dummy; |
550 | if (m_negativeCache.TryGetValue(id, out dummy)) | 551 | if (m_negativeCache.TryGetValue(id, out dummy)) |
551 | { | 552 | { |
552 | negative = true; | 553 | return false; |
553 | return null; | ||
554 | } | 554 | } |
555 | 555 | ||
556 | AssetBase asset = null; | ||
557 | asset = GetFromWeakReference(id); | 556 | asset = GetFromWeakReference(id); |
558 | if (asset != null && m_updateFileTimeOnCacheHit) | 557 | if (asset != null && m_updateFileTimeOnCacheHit) |
559 | { | 558 | { |
@@ -592,7 +591,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
592 | GenerateCacheHitReport().ForEach(l => m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0}", l)); | 591 | GenerateCacheHitReport().ForEach(l => m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0}", l)); |
593 | } | 592 | } |
594 | 593 | ||
595 | return asset; | 594 | return true; |
596 | } | 595 | } |
597 | 596 | ||
598 | public bool Check(string id) | 597 | public bool Check(string id) |
@@ -607,8 +606,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
607 | 606 | ||
608 | public AssetBase GetCached(string id) | 607 | public AssetBase GetCached(string id) |
609 | { | 608 | { |
610 | bool negative; | 609 | AssetBase asset; |
611 | return Get(id, out negative); | 610 | Get(id, out asset); |
611 | return asset; | ||
612 | } | 612 | } |
613 | 613 | ||
614 | public void Expire(string id) | 614 | public void Expire(string id) |
@@ -1236,23 +1236,22 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1236 | 1236 | ||
1237 | public AssetMetadata GetMetadata(string id) | 1237 | public AssetMetadata GetMetadata(string id) |
1238 | { | 1238 | { |
1239 | bool negative; | 1239 | AssetBase asset; |
1240 | AssetBase asset = Get(id, out negative); | 1240 | Get(id, out asset); |
1241 | return asset.Metadata; | 1241 | return asset.Metadata; |
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | public byte[] GetData(string id) | 1244 | public byte[] GetData(string id) |
1245 | { | 1245 | { |
1246 | bool negative; | 1246 | AssetBase asset; |
1247 | AssetBase asset = Get(id, out negative); | 1247 | Get(id, out asset); |
1248 | return asset.Data; | 1248 | return asset.Data; |
1249 | } | 1249 | } |
1250 | 1250 | ||
1251 | public bool Get(string id, object sender, AssetRetrieved handler) | 1251 | public bool Get(string id, object sender, AssetRetrieved handler) |
1252 | { | 1252 | { |
1253 | bool negative; | 1253 | AssetBase asset; |
1254 | AssetBase asset = Get(id, out negative); | 1254 | if (!Get(id, out asset)) |
1255 | if (negative) | ||
1256 | return false; | 1255 | return false; |
1257 | handler(id, sender, asset); | 1256 | handler(id, sender, asset); |
1258 | return true; | 1257 | return true; |
@@ -1284,8 +1283,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1284 | 1283 | ||
1285 | public bool UpdateContent(string id, byte[] data) | 1284 | public bool UpdateContent(string id, byte[] data) |
1286 | { | 1285 | { |
1287 | bool negative; | 1286 | AssetBase asset; |
1288 | AssetBase asset = Get(id, out negative); | 1287 | if (!Get(id, out asset)) |
1288 | return false; | ||
1289 | asset.Data = data; | 1289 | asset.Data = data; |
1290 | Cache(asset); | 1290 | Cache(asset); |
1291 | return true; | 1291 | return true; |
diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs index 342d4d9..abe9b23 100644 --- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs | |||
@@ -131,16 +131,15 @@ namespace OpenSim.Region.CoreModules.Asset | |||
131 | // We don't do negative caching | 131 | // We don't do negative caching |
132 | } | 132 | } |
133 | 133 | ||
134 | public AssetBase Get(string id, out bool negative) | 134 | public bool Get(string id, out AssetBase asset) |
135 | { | 135 | { |
136 | negative = false; | 136 | Object a = null; |
137 | m_Cache.TryGet(id, out a); | ||
137 | 138 | ||
138 | Object asset = null; | 139 | Debug(a); |
139 | m_Cache.TryGet(id, out asset); | ||
140 | |||
141 | Debug(asset); | ||
142 | 140 | ||
143 | return (AssetBase)asset; | 141 | asset = (AssetBase)a; |
142 | return true; | ||
144 | } | 143 | } |
145 | 144 | ||
146 | public void Expire(string id) | 145 | public void Expire(string id) |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 3e47782..535d946 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -299,8 +299,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
299 | if (bakedTextureFace == null) | 299 | if (bakedTextureFace == null) |
300 | continue; | 300 | continue; |
301 | 301 | ||
302 | bool negative; | 302 | AssetBase asset; |
303 | AssetBase asset = cache.Get(bakedTextureFace.TextureID.ToString(), out negative); | 303 | cache.Get(bakedTextureFace.TextureID.ToString(), out asset); |
304 | 304 | ||
305 | if (asset != null && asset.Local) | 305 | if (asset != null && asset.Local) |
306 | { | 306 | { |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index ce61ff0..bf9327c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs | |||
@@ -209,10 +209,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
209 | 209 | ||
210 | if (m_Cache != null) | 210 | if (m_Cache != null) |
211 | { | 211 | { |
212 | bool negative; | 212 | if (!m_Cache.Get(id, out asset)) |
213 | asset = m_Cache.Get(id, out negative); | ||
214 | |||
215 | if (negative) | ||
216 | return null; | 213 | return null; |
217 | 214 | ||
218 | if (asset != null) | 215 | if (asset != null) |
@@ -242,9 +239,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
242 | 239 | ||
243 | public AssetBase GetCached(string id) | 240 | public AssetBase GetCached(string id) |
244 | { | 241 | { |
245 | bool negative; | 242 | AssetBase asset = null; |
246 | if (m_Cache != null) | 243 | if (m_Cache != null) |
247 | return m_Cache.Get(id, out negative); | 244 | m_Cache.Get(id, out asset); |
248 | 245 | ||
249 | return null; | 246 | return null; |
250 | } | 247 | } |
@@ -255,10 +252,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
255 | 252 | ||
256 | if (m_Cache != null) | 253 | if (m_Cache != null) |
257 | { | 254 | { |
258 | bool negative; | 255 | if (!m_Cache.Get(id, out asset)) |
259 | asset = m_Cache.Get(id, out negative); | ||
260 | |||
261 | if (negative) | ||
262 | return null; | 256 | return null; |
263 | 257 | ||
264 | if (asset != null) | 258 | if (asset != null) |
@@ -281,10 +275,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
281 | 275 | ||
282 | if (m_Cache != null) | 276 | if (m_Cache != null) |
283 | { | 277 | { |
284 | bool negative; | 278 | if (!m_Cache.Get(id, out asset)) |
285 | asset = m_Cache.Get(id, out negative); | ||
286 | |||
287 | if (negative) | ||
288 | return null; | 279 | return null; |
289 | 280 | ||
290 | if (asset != null) | 281 | if (asset != null) |
@@ -304,10 +295,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
304 | 295 | ||
305 | if (m_Cache != null) | 296 | if (m_Cache != null) |
306 | { | 297 | { |
307 | bool negative; | 298 | if (!m_Cache.Get(id, out asset)) |
308 | asset = m_Cache.Get(id, out negative); | ||
309 | |||
310 | if (negative) | ||
311 | return false; | 299 | return false; |
312 | } | 300 | } |
313 | 301 | ||
@@ -398,9 +386,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
398 | { | 386 | { |
399 | AssetBase asset = null; | 387 | AssetBase asset = null; |
400 | 388 | ||
401 | bool negative; | ||
402 | if (m_Cache != null) | 389 | if (m_Cache != null) |
403 | asset = m_Cache.Get(id, out negative); | 390 | m_Cache.Get(id, out asset); |
404 | 391 | ||
405 | if (asset != null) | 392 | if (asset != null) |
406 | { | 393 | { |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index bbaed21..2fe9733 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -159,10 +159,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
159 | AssetBase asset = null; | 159 | AssetBase asset = null; |
160 | if (m_Cache != null) | 160 | if (m_Cache != null) |
161 | { | 161 | { |
162 | bool negative; | 162 | if (!m_Cache.Get(id, out asset)) |
163 | asset = m_Cache.Get(id, out negative); | ||
164 | |||
165 | if (negative) | ||
166 | return null; | 163 | return null; |
167 | } | 164 | } |
168 | 165 | ||
@@ -183,13 +180,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
183 | { | 180 | { |
184 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); | 181 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); |
185 | 182 | ||
183 | AssetBase asset = null; | ||
186 | if (m_Cache != null) | 184 | if (m_Cache != null) |
187 | { | 185 | m_Cache.Get(id, out asset); |
188 | bool negative; | ||
189 | return m_Cache.Get(id, out negative); | ||
190 | } | ||
191 | 186 | ||
192 | return null; | 187 | return asset; |
193 | } | 188 | } |
194 | 189 | ||
195 | public AssetMetadata GetMetadata(string id) | 190 | public AssetMetadata GetMetadata(string id) |
@@ -197,9 +192,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
197 | AssetBase asset = null; | 192 | AssetBase asset = null; |
198 | if (m_Cache != null) | 193 | if (m_Cache != null) |
199 | { | 194 | { |
200 | bool negative; | 195 | if (!m_Cache.Get(id, out asset)) |
201 | asset = m_Cache.Get(id, out negative); | ||
202 | if (negative) | ||
203 | return null; | 196 | return null; |
204 | } | 197 | } |
205 | 198 | ||
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 9595e7b..810da2f 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -246,11 +246,7 @@ namespace OpenSim.Services.Connectors | |||
246 | 246 | ||
247 | if (m_Cache != null) | 247 | if (m_Cache != null) |
248 | { | 248 | { |
249 | bool negative; | 249 | if (!m_Cache.Get(id, out asset)) |
250 | |||
251 | asset = m_Cache.Get(id, out negative); | ||
252 | |||
253 | if (negative) | ||
254 | return null; | 250 | return null; |
255 | } | 251 | } |
256 | 252 | ||
@@ -283,21 +279,21 @@ namespace OpenSim.Services.Connectors | |||
283 | { | 279 | { |
284 | // m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Cache request for {0}", id); | 280 | // m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Cache request for {0}", id); |
285 | 281 | ||
286 | bool negative; | 282 | AssetBase asset = null; |
287 | if (m_Cache != null) | 283 | if (m_Cache != null) |
288 | return m_Cache.Get(id, out negative); | 284 | { |
285 | m_Cache.Get(id, out asset); | ||
286 | } | ||
289 | 287 | ||
290 | return null; | 288 | return asset; |
291 | } | 289 | } |
292 | 290 | ||
293 | public AssetMetadata GetMetadata(string id) | 291 | public AssetMetadata GetMetadata(string id) |
294 | { | 292 | { |
295 | if (m_Cache != null) | 293 | if (m_Cache != null) |
296 | { | 294 | { |
297 | bool negative; | 295 | AssetBase fullAsset; |
298 | AssetBase fullAsset = m_Cache.Get(id, out negative); | 296 | if (!m_Cache.Get(id, out fullAsset)) |
299 | |||
300 | if (negative) | ||
301 | return null; | 297 | return null; |
302 | 298 | ||
303 | if (fullAsset != null) | 299 | if (fullAsset != null) |
@@ -314,10 +310,8 @@ namespace OpenSim.Services.Connectors | |||
314 | { | 310 | { |
315 | if (m_Cache != null) | 311 | if (m_Cache != null) |
316 | { | 312 | { |
317 | bool negative; | 313 | AssetBase fullAsset; |
318 | AssetBase fullAsset = m_Cache.Get(id, out negative); | 314 | if (!m_Cache.Get(id, out fullAsset)) |
319 | |||
320 | if (negative) | ||
321 | return null; | 315 | return null; |
322 | 316 | ||
323 | if (fullAsset != null) | 317 | if (fullAsset != null) |
@@ -407,11 +401,7 @@ namespace OpenSim.Services.Connectors | |||
407 | AssetBase asset = null; | 401 | AssetBase asset = null; |
408 | if (m_Cache != null) | 402 | if (m_Cache != null) |
409 | { | 403 | { |
410 | bool negative; | 404 | if (!m_Cache.Get(id, out asset)) |
411 | |||
412 | asset = m_Cache.Get(id, out negative); | ||
413 | |||
414 | if (negative) | ||
415 | return false; | 405 | return false; |
416 | } | 406 | } |
417 | 407 | ||
@@ -613,9 +603,8 @@ namespace OpenSim.Services.Connectors | |||
613 | { | 603 | { |
614 | AssetBase asset = null; | 604 | AssetBase asset = null; |
615 | 605 | ||
616 | bool negative; | ||
617 | if (m_Cache != null) | 606 | if (m_Cache != null) |
618 | asset = m_Cache.Get(id, out negative); | 607 | m_Cache.Get(id, out asset); |
619 | 608 | ||
620 | if (asset == null) | 609 | if (asset == null) |
621 | { | 610 | { |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index af5f69a..953bc2a 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -136,9 +136,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
136 | // Cache fetch | 136 | // Cache fetch |
137 | if (m_cache != null) | 137 | if (m_cache != null) |
138 | { | 138 | { |
139 | bool negative; | 139 | AssetBase asset; |
140 | AssetBase asset = m_cache.Get(id, out negative); | 140 | if (!m_cache.Get(id, out asset)) |
141 | if (negative) | ||
142 | return null; | 141 | return null; |
143 | if (asset != null) | 142 | if (asset != null) |
144 | return asset; | 143 | return asset; |
@@ -150,9 +149,9 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
150 | 149 | ||
151 | public AssetBase GetCached(string id) | 150 | public AssetBase GetCached(string id) |
152 | { | 151 | { |
153 | bool negative; | 152 | AssetBase asset; |
154 | if (m_cache != null) | 153 | if (m_cache != null) |
155 | return m_cache.Get(id, out negative); | 154 | m_cache.Get(id, out asset); |
156 | 155 | ||
157 | return null; | 156 | return null; |
158 | } | 157 | } |
@@ -173,9 +172,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
173 | // Cache fetch | 172 | // Cache fetch |
174 | if (m_cache != null) | 173 | if (m_cache != null) |
175 | { | 174 | { |
176 | bool negative; | 175 | AssetBase asset; |
177 | AssetBase asset = m_cache.Get(id, out negative); | 176 | if (!m_cache.Get(id, out asset)) |
178 | if (negative) | ||
179 | return null; | 177 | return null; |
180 | if (asset != null) | 178 | if (asset != null) |
181 | return asset.Metadata; | 179 | return asset.Metadata; |
@@ -219,10 +217,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
219 | // Cache fetch | 217 | // Cache fetch |
220 | if (m_cache != null) | 218 | if (m_cache != null) |
221 | { | 219 | { |
222 | bool negative; | 220 | AssetBase asset; |
223 | AssetBase asset = m_cache.Get(id, out negative); | 221 | if (!m_cache.Get(id, out asset)) |
224 | |||
225 | if (negative) | ||
226 | return false; | 222 | return false; |
227 | 223 | ||
228 | if (asset != null) | 224 | if (asset != null) |