diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index e40caec..ebec9d2 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | |||
@@ -194,6 +194,14 @@ namespace OpenSim.Region.CoreModules.Asset | |||
194 | 194 | ||
195 | #region IImprovedAssetCache Members | 195 | #region IImprovedAssetCache Members |
196 | 196 | ||
197 | public bool Check(string id) | ||
198 | { | ||
199 | AssetBase asset; | ||
200 | |||
201 | // XXX:This is probably not an efficient implementation. | ||
202 | return m_cache.TryGetValue(id, out asset); | ||
203 | } | ||
204 | |||
197 | /// <summary> | 205 | /// <summary> |
198 | /// Cache asset. | 206 | /// Cache asset. |
199 | /// </summary> | 207 | /// </summary> |
@@ -308,9 +316,12 @@ namespace OpenSim.Region.CoreModules.Asset | |||
308 | /// </summary> | 316 | /// </summary> |
309 | public void Close() | 317 | public void Close() |
310 | { | 318 | { |
311 | m_enabled = false; | 319 | if (m_enabled) |
312 | m_cache.Clear(); | 320 | { |
313 | m_cache = null; | 321 | m_enabled = false; |
322 | m_cache.Clear(); | ||
323 | m_cache = null; | ||
324 | } | ||
314 | } | 325 | } |
315 | 326 | ||
316 | /// <summary> | 327 | /// <summary> |