From 07b48fd58c343d18b8ce64179e344439070511e8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 29 Dec 2016 15:47:46 +0000 Subject: Add negative caching to flotsam cache. Prevents scripts from hammering the asset server --- OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Connectors/Asset') 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 asset = SynchronousRestObjectRequester.MakeRequest("GET", uri, 0, m_Auth); - if (asset != null && m_Cache != null) - m_Cache.Cache(asset); + if (m_Cache != null) + { + if (asset != null) + m_Cache.Cache(asset); + else + m_Cache.CacheNegative(id); + } } return asset; } -- cgit v1.1