diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs index 2cc2962..835678d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Asset/RemoteAssetServiceConnector.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using log4net; | 28 | using log4net; |
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | ||
30 | using System.IO; | 31 | using System.IO; |
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using Nini.Config; | 33 | using Nini.Config; |
@@ -48,6 +49,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset | |||
48 | 49 | ||
49 | private bool m_Enabled = false; | 50 | private bool m_Enabled = false; |
50 | private string m_ServerURI = String.Empty; | 51 | private string m_ServerURI = String.Empty; |
52 | private Dictionary<Scene, IImprovedAssetCache> m_AssetCache = | ||
53 | new Dictionary<Scene, IImprovedAssetCache>(); | ||
51 | 54 | ||
52 | public string Name | 55 | public string Name |
53 | { | 56 | { |
@@ -103,10 +106,26 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset | |||
103 | 106 | ||
104 | public void RemoveRegion(Scene scene) | 107 | public void RemoveRegion(Scene scene) |
105 | { | 108 | { |
109 | if (!m_Enabled) | ||
110 | return; | ||
111 | |||
112 | m_AssetCache.Remove(scene); | ||
106 | } | 113 | } |
107 | 114 | ||
108 | public void RegionLoaded(Scene scene) | 115 | public void RegionLoaded(Scene scene) |
109 | { | 116 | { |
117 | if (!m_Enabled) | ||
118 | return; | ||
119 | |||
120 | m_AssetCache[scene] = | ||
121 | scene.RequestModuleInterface<IImprovedAssetCache>(); | ||
122 | |||
123 | m_log.InfoFormat("[ASSET CONNECTOR]: Enabled remote assets for region {0}", scene.RegionInfo.RegionName); | ||
124 | |||
125 | if (m_AssetCache[scene] != null) | ||
126 | { | ||
127 | m_log.InfoFormat("[ASSET CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); | ||
128 | } | ||
110 | } | 129 | } |
111 | 130 | ||
112 | public AssetBase Get(string id) | 131 | public AssetBase Get(string id) |