aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-30 13:59:05 +0000
committerMelanie Thielker2017-01-30 13:59:05 +0000
commit5a18ea31cf9d9a97fc1a65f8623b633c244221c2 (patch)
tree80eae98cddde4ffbdb7287ad0ac82449c33cb316 /OpenSim/Region/CoreModules/ServiceConnectorsOut
parentComment two very spammy debug messages that the usr can't do anything about (diff)
downloadopensim-SC_OLD-5a18ea31cf9d9a97fc1a65f8623b633c244221c2.zip
opensim-SC_OLD-5a18ea31cf9d9a97fc1a65f8623b633c244221c2.tar.gz
opensim-SC_OLD-5a18ea31cf9d9a97fc1a65f8623b633c244221c2.tar.bz2
opensim-SC_OLD-5a18ea31cf9d9a97fc1a65f8623b633c244221c2.tar.xz
Make negative asset caching actually work
Also fixes some merge artefacts in HGAssetBroker where cached assets were requested but not actually used and completely squelch a materials debug message because there is nothing the user can do to fix it anyway.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs34
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs36
2 files changed, 56 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
index f5aa971..ce61ff0 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
@@ -209,7 +209,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
209 209
210 if (m_Cache != null) 210 if (m_Cache != null)
211 { 211 {
212 asset = m_Cache.Get(id); 212 bool negative;
213 asset = m_Cache.Get(id, out negative);
214
215 if (negative)
216 return null;
213 217
214 if (asset != null) 218 if (asset != null)
215 return asset; 219 return asset;
@@ -238,8 +242,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
238 242
239 public AssetBase GetCached(string id) 243 public AssetBase GetCached(string id)
240 { 244 {
245 bool negative;
241 if (m_Cache != null) 246 if (m_Cache != null)
242 return m_Cache.Get(id); 247 return m_Cache.Get(id, out negative);
243 248
244 return null; 249 return null;
245 } 250 }
@@ -250,8 +255,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
250 255
251 if (m_Cache != null) 256 if (m_Cache != null)
252 { 257 {
253 if (m_Cache != null) 258 bool negative;
254 m_Cache.Get(id); 259 asset = m_Cache.Get(id, out negative);
260
261 if (negative)
262 return null;
255 263
256 if (asset != null) 264 if (asset != null)
257 return asset.Metadata; 265 return asset.Metadata;
@@ -273,8 +281,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
273 281
274 if (m_Cache != null) 282 if (m_Cache != null)
275 { 283 {
276 if (m_Cache != null) 284 bool negative;
277 m_Cache.Get(id); 285 asset = m_Cache.Get(id, out negative);
286
287 if (negative)
288 return null;
278 289
279 if (asset != null) 290 if (asset != null)
280 return asset.Data; 291 return asset.Data;
@@ -292,7 +303,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
292 AssetBase asset = null; 303 AssetBase asset = null;
293 304
294 if (m_Cache != null) 305 if (m_Cache != null)
295 asset = m_Cache.Get(id); 306 {
307 bool negative;
308 asset = m_Cache.Get(id, out negative);
309
310 if (negative)
311 return false;
312 }
296 313
297 if (asset != null) 314 if (asset != null)
298 { 315 {
@@ -381,8 +398,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
381 { 398 {
382 AssetBase asset = null; 399 AssetBase asset = null;
383 400
401 bool negative;
384 if (m_Cache != null) 402 if (m_Cache != null)
385 asset = m_Cache.Get(id); 403 asset = m_Cache.Get(id, out negative);
386 404
387 if (asset != null) 405 if (asset != null)
388 { 406 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index 7190aa0..bbaed21 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
@@ -158,7 +158,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
158 158
159 AssetBase asset = null; 159 AssetBase asset = null;
160 if (m_Cache != null) 160 if (m_Cache != null)
161 asset = m_Cache.Get(id); 161 {
162 bool negative;
163 asset = m_Cache.Get(id, out negative);
164
165 if (negative)
166 return null;
167 }
162 168
163 if (asset == null) 169 if (asset == null)
164 { 170 {
@@ -178,7 +184,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
178// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); 184// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id);
179 185
180 if (m_Cache != null) 186 if (m_Cache != null)
181 return m_Cache.Get(id); 187 {
188 bool negative;
189 return m_Cache.Get(id, out negative);
190 }
182 191
183 return null; 192 return null;
184 } 193 }
@@ -187,7 +196,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
187 { 196 {
188 AssetBase asset = null; 197 AssetBase asset = null;
189 if (m_Cache != null) 198 if (m_Cache != null)
190 asset = m_Cache.Get(id); 199 {
200 bool negative;
201 asset = m_Cache.Get(id, out negative);
202 if (negative)
203 return null;
204 }
191 205
192 if (asset != null) 206 if (asset != null)
193 return asset.Metadata; 207 return asset.Metadata;
@@ -210,7 +224,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
210 AssetBase asset = null; 224 AssetBase asset = null;
211 225
212 if (m_Cache != null) 226 if (m_Cache != null)
213 asset = m_Cache.Get(id); 227 {
228 bool negative;
229 asset = m_Cache.Get(id, out negative);
230 if (negative)
231 return null;
232 }
214 233
215 if (asset != null) 234 if (asset != null)
216 return asset.Data; 235 return asset.Data;
@@ -232,7 +251,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
232 251
233 if (m_Cache != null) 252 if (m_Cache != null)
234 { 253 {
235 AssetBase asset = m_Cache.Get(id); 254 bool negative;
255 AssetBase asset = m_Cache.Get(id, out negative);
256
257 if (negative)
258 return false;
236 259
237 if (asset != null) 260 if (asset != null)
238 { 261 {
@@ -286,8 +309,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
286 public bool UpdateContent(string id, byte[] data) 309 public bool UpdateContent(string id, byte[] data)
287 { 310 {
288 AssetBase asset = null; 311 AssetBase asset = null;
312 bool negative;
289 if (m_Cache != null) 313 if (m_Cache != null)
290 m_Cache.Get(id); 314 m_Cache.Get(id, out negative);
291 if (asset != null) 315 if (asset != null)
292 { 316 {
293 asset.Data = data; 317 asset.Data = data;