diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index 51fc3d1..10c0e85 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | |||
@@ -115,7 +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 | return Get(id) != null; | 118 | AssetBase asset; |
119 | if (!Get(id, out asset)) | ||
120 | return false; | ||
121 | return asset != null; | ||
119 | } | 122 | } |
120 | 123 | ||
121 | public void Cache(AssetBase asset) | 124 | public void Cache(AssetBase asset) |
@@ -129,9 +132,10 @@ namespace OpenSim.Region.CoreModules.Asset | |||
129 | // We don't do negative caching | 132 | // We don't do negative caching |
130 | } | 133 | } |
131 | 134 | ||
132 | public AssetBase Get(string id) | 135 | public bool Get(string id, out AssetBase asset) |
133 | { | 136 | { |
134 | return (AssetBase)m_Cache.Get(id); | 137 | asset = (AssetBase)m_Cache.Get(id); |
138 | return true; | ||
135 | } | 139 | } |
136 | 140 | ||
137 | public void Expire(string id) | 141 | public void Expire(string id) |