From f021c64eb060046bff6e91384e1bbca0384b7d61 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 29 Dec 2016 12:34:09 +0000 Subject: Refactor: Rename IImprovedAssetCache to IAssetCache as the old IAssetCache is long gone. --- OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs') diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index f720748..d78b082 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs @@ -40,7 +40,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Asset { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CoreAssetCache")] - public class CoreAssetCache : ISharedRegionModule, IImprovedAssetCache + public class CoreAssetCache : ISharedRegionModule, IAssetCache { private static readonly ILog m_log = LogManager.GetLogger( @@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Asset public void AddRegion(Scene scene) { if (m_Enabled) - scene.RegisterModuleInterface(this); + scene.RegisterModuleInterface(this); } public void RemoveRegion(Scene scene) @@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Asset } //////////////////////////////////////////////////////////// - // IImprovedAssetCache + // IAssetCache // public bool Check(string id) { -- cgit v1.1 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/Region/CoreModules/Asset/CoreAssetCache.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs') diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index d78b082..82bc5cc 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs @@ -124,6 +124,11 @@ namespace OpenSim.Region.CoreModules.Asset m_Cache.Store(asset.ID, asset); } + public void CacheNegative(string id) + { + // We don't do negative caching + } + public AssetBase Get(string id) { return (AssetBase)m_Cache.Get(id); -- cgit v1.1