diff options
author | Melanie Thielker | 2016-12-29 15:47:46 +0000 |
---|---|---|
committer | Melanie Thielker | 2016-12-29 15:47:46 +0000 |
commit | 07b48fd58c343d18b8ce64179e344439070511e8 (patch) | |
tree | 1a2bfb247699b8b6b94fa9d8146ee5341a08011f /OpenSim/Services/Connectors/Asset | |
parent | Actually rename the file, too (diff) | |
download | opensim-SC-07b48fd58c343d18b8ce64179e344439070511e8.zip opensim-SC-07b48fd58c343d18b8ce64179e344439070511e8.tar.gz opensim-SC-07b48fd58c343d18b8ce64179e344439070511e8.tar.bz2 opensim-SC-07b48fd58c343d18b8ce64179e344439070511e8.tar.xz |
Add negative caching to flotsam cache. Prevents scripts from hammering the asset server
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index b8449d7..bdc3bef 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -260,8 +260,13 @@ namespace OpenSim.Services.Connectors | |||
260 | asset = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, m_Auth); | 260 | asset = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, m_Auth); |
261 | 261 | ||
262 | 262 | ||
263 | if (asset != null && m_Cache != null) | 263 | if (m_Cache != null) |
264 | m_Cache.Cache(asset); | 264 | { |
265 | if (asset != null) | ||
266 | m_Cache.Cache(asset); | ||
267 | else | ||
268 | m_Cache.CacheNegative(id); | ||
269 | } | ||
265 | } | 270 | } |
266 | return asset; | 271 | return asset; |
267 | } | 272 | } |